I have a macro that finds a column called Product Type, inserts a blank column and then inserts a formula 1 row down. I would like to Autofill that formula down in my macro. Problem is, Product Type could be in different columns depending on which report I download into Excel. I have found the following code on this site but it only autofills from cell B2. Can it be modified to Autofill my formula depending on where the Product Type column is located?
Range("a2").Select
fillrange = Range(Selection, Selection.End(xlDown)).Offset(0, 1).Address
Set SourceRange = Worksheets("Sheet1").Range("b2")
SourceRange.AutoFill Destination:=Range(fillrange)
Range("a2").Select
fillrange = Range(Selection, Selection.End(xlDown)).Offset(0, 1).Address
Set SourceRange = Worksheets("Sheet1").Range("b2")
SourceRange.AutoFill Destination:=Range(fillrange)