Forum Discussion
zaladrew1415
Oct 18, 2021Copper Contributor
Dynamic use VBA to autofill
Hi Microsoft community, I need some help with the following problem: The Macro should select the first cell with the if function and autofill the complete range in the colum...
HansVogelaar
Oct 18, 2021MVP
You can use this. It avoids selecting cells, which is generally more efficient.
Dim m As Long
Range("AS1").Value = "Actual GBS"
m = Range("Q" & Rows.Count).End(xlUp).Row
Range("AS2:AS" & m).Formula = "=IF(Q2=R2,Q2,Q2-R2)"