Hi,Originally Posted by keierkr
the function to find the date column would be a Match
=MATCH(A1,Sheet2!$B$1:$Z$1,0)
will return the nth column from Sheet2 according to the date in A1
To do this by code, easiest would be in the formThe rest of the code could be deduced from a copy of a recorded macro, Tools, Macro record, and perform the required copy, then amend the code to include iColumn as the variable column number.![]()
iColumn = WorksheetFunction.Match(Range("A1"), Sheets("Sheet2").Range("$B$1:$Z$1"), 0)
Let me know how you go.
---
Bookmarks