frank_m
12-14-2010, 02:06 AM
I'm using the code shown below to give a sum total in Cell P18 by adding the number value in Cell i18 to Cell P18
It works fine as long as both cells are formatted as a number or general, but if the cells accidentally become formatted as text the result is concatenation instead of summing.
Is there an alternative command that will sum the two numbers regardless of the cell formatting?
Range("P18").Value = Range("P18").Value + Range("I18").Value
It works fine as long as both cells are formatted as a number or general, but if the cells accidentally become formatted as text the result is concatenation instead of summing.
Is there an alternative command that will sum the two numbers regardless of the cell formatting?
Range("P18").Value = Range("P18").Value + Range("I18").Value