condition

T

Tony

I am creating a macro to calculate sum of the cells in
column. In a cells itself I have IF formulas which
calculate value based on other cells in the row and
display result if it is greater than 0 or display nothing
("") if it is 0. I am receiving error when the value in
the cell is 0. How I can modify my macro so that it will
allow 0 and will not try to add "" to the number ?

Thanks for help.

Tony
 
G

Guest

Hi Frank,

Thank you very much for your reply. In the meantime I have
found solution to my problem. I have added the Val before
the cell reference. It looks now like

... + Val(Worksheets("Entry").Cells(I, 7))

and it works exactly the way I wanted.

Regards,

Tony
 
Top