I'm trying to convert this formula to VBA code:
Where col1 = "I"
col2 = "N"
i = 3
I get a type mismatch error in VBA; however, the formula runs fine in Excel. How do I resolve this problem?
Thanks
PHP:
=SUMIF(I:I,N3,G:G)
Code:
Cells(i, col6).Value = Application.SumIf(Range(col1 & _
Chr(58) & col1), Cells(i, col2), (Range("G:G")))
col2 = "N"
i = 3
I get a type mismatch error in VBA; however, the formula runs fine in Excel. How do I resolve this problem?
Thanks