Hi!
I'm using this script:
Sub GoGo()
' Finds first blank column
NewCol = ActiveSheet.Cells(1, Columns.Count).End(xlToLeft).Column + 1
' Puts your header at the top of the first blank column
Cells(1, NewCol).Value = "WeekNumber"
' Works out the first blank row under the new header
lastrow = ActiveSheet.Cells(Rows.Count, NewCol).End(xlUp).Row + 1
' Updates the first blank row of the first blank column with your desired formula
Cells(lastrow, NewCol).Formula = "=VLOOKUP(A1:A52,Blad2!$A:$C,3,0)"
End Sub
With this script I will only get results in the first row. But I would like this to run for a set amount of rows. Lets say 53 as in the example file.
// 2times
Bookmarks