I wrote a function that works when I enter it one row at a time because it uses the ActiveCell.row function. But when I copy that function down all of the results are looking at the ActiveCell's row and not the row the function is on. Here is the command, how do I change it?
Code:
CurRow = ActiveCell.Row
If Cells(CurRow, q) = MaxVal Then
MaxMinRevenueYears = Right(Cells(HeaderRow - 1, q), 4)
Exit For
End If