Hi Janet, Another, perhaps neater way is to set H4 to =IFERROR(D4/G4,"-") which will override not only #DIV/0 errors but also those pesky #N/As that crop up with monotonous regularity in my worksheets! (I overote them with a "-", but you could equally use "" if you want the field to appear empty (be careful with this though, because of course it isn't!).
Regards, Sid. On Jul 28, 7:08 pm, janet dickson <janetdicks...@gmail.com> wrote: > Hi Team, > > I have a challenge, how can I create a formula using VBA?! > > Attached file show details, but i don't want to see *#DIV/0! *error in case > columns used in division does not have any data!! > > column E - F = column G (sometimes column E - F does not have any data, so i > don't want to see 0 in column G > > column (G/D) = column H (sometimes column G or D does not have any data, so > i don't want to see *#DIV/0! *error > > Jen D > > Formula.xls > 29KViewDownload -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 7000 subscribers worldwide and receive many nice notes about the learning and support from the group.Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe