Hi Gurus and Experts,
I have been playing with the SUMIFS formula code for a while now but I am not sure why it is still showing the error. I have written the following code:
For reference, I am attaching the excel file herewith. It would be of immense help if I could get the guidance to trace where I committed mistakes.![]()
Sub A() Dim endrow as Long, lastrow as Long '........ endrow, lrow and lastrow are set in different stages of processing For i = endrow To 1 Step -1 If ActiveSheet.Range("C" & i).Value = "Table Head" Then ActiveSheet.Range("C" & i + 1).Formula "=SUMIFS(R[-" & lastrow + 20 - 1 & "]C[18]:R[-23]C[18]," & _ "R[-" & lastrow + 20 - 1 & "]C:R[-23]C,""AA"")" Exit For End If Next I End Sub
Thank you
Roshan Shakya











LinkBack URL
About LinkBacks
Register To Reply

Bookmarks