I have a formula that I am inserting in an excel 2003 spreadsheet. I am getting a DIV/0 error. I know what is happening but I don't know how to fix it. E is 0 in the line that is giving me an issue. So I would like to test for either D or E being 0. I do know how to do if statements, just not if statements within a formula. I would be thankful for any help.
Tom
Tom
Code:
If iColCnt = 5 Then ActiveSheet.Cells(iBRow - 1, iColCnt + 1).Formula = _
"=if(D" & iTRow & "=0,0,E" & iTRow & "/D" & iTRow & ")"