Hi, In H4 enter:
=IF(G4=0,"",D4/G4) And similarly for other cells that contain a division operator Basically we are saying, if the denominator = 0 then nothing, otherwise, do the math. Regards - Dave. Date: Wed, 28 Jul 2010 21:08:00 +0300 Subject: $$Excel-Macros$$ Help: Creating formula using VBA From: janetdicks...@gmail.com To: excel-macros@googlegroups.com 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 -- ---------------------------------------------------------------------------------- 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 -- ---------------------------------------------------------------------------------- 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