I have currently defined two variables(StartRow and EndRow) in my code: (counter is an integer)
I would like to replace the input range I currently have as "C4:C5" with syntax that allows me to refer to StartRow and EndRow as the range but I am having difficulty in being able to do so as I am fairly new to VBA.
I am trying to use the StartRow and EndRow variables as the code above is in a loop and my r values will be changing
Thanks in advance for any help!
VBA Code:
StartRow = Cells(r + 1, lc)
EndRow = Cells(r + counter, lc)
VBA Code:
Range(Cells(r, "C"), Cells(r, lc)).Formula = "=IF(COUNTIF(C4:C5, ""X""), ""X"", "" "")"
Thanks in advance for any help!