I'm trying to write a VB Script that will autofill horizontally. For example, my data range is G2:Y2. I am trying to get the script to autofill a formula between cells G1 and Y1. But the script needs to be flexible enough to autofill through column AA if there is data between cells G2 and AA2.
I frequently use code that does this vertically, but I have not been able to do this horizontally. For reference, following is my code to do this vertically.
Range("B2").AutoFill Destination:=Range("B2:B" & Range("A65536").End(xlUp).Row)
Any assistance is appreciated.
I frequently use code that does this vertically, but I have not been able to do this horizontally. For reference, following is my code to do this vertically.
Range("B2").AutoFill Destination:=Range("B2:B" & Range("A65536").End(xlUp).Row)
Any assistance is appreciated.