[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Excel Question



PureBytes Links

Trading Reference Links

Hello All,
	I'm having trouble with a macro and was hoping someone could
help me. Here is the formula:
=IF(H3=0,0,IF(H3<>"""",PRODUCT(INDEX(F:F,ROW()-ABS(H3)+1,1):INDEX(F:F,RO
W(),1))-1,"""")), which should return 0, a number, or an empty cell.
When I type this in a cell in Column I, there is no problem. However,
when I created a macro, with the help of someone else, containing this
formula, it won't return an empty cell, only a number or 0. Here is the
macro: 
Set frng = Range("i3:i" & Range("h65536").End(xlUp).Row)
With frng
.Formula = _
"=IF(H3=0,0,IF(H3<>"""",PRODUCT(INDEX(F:F,ROW()-ABS(H3)+1,1):INDEX(F:F,R
OW(),1))-1,""""))"
.Formula = .Value 
End With
It seems that the formula is interpreted differently in the macro form.
Does anybody know why? 
Thanks,
Trey