Hi all,
I am trying to repeat the code below a number of times until it reaches row 28. Every time, the row number increases 1, e.g. all 21 becomes 22, 23 and so on until reaches 28. I am not sure how to do it with a loop, what I have done is to copy and paste the code 8 times, and change the row values manually. But this make the code too long, is there a easier way to do this? perhaps with a loop?
Thanks in advance.
I am trying to repeat the code below a number of times until it reaches row 28. Every time, the row number increases 1, e.g. all 21 becomes 22, 23 and so on until reaches 28. I am not sure how to do it with a loop, what I have done is to copy and paste the code 8 times, and change the row values manually. But this make the code too long, is there a easier way to do this? perhaps with a loop?
Thanks in advance.
VBA Code:
If Range("AB21").Value <> "" Then
Range("AW21").Value = 0
Range("AX21").Value = Range("N10").Value
Else
Range("AW21").ClearContents
Range("AX21").ClearContents
End If