Hi Everyone,
I'm hoping someone can help me correct my code. I have got stuck on one piece of my code and having trouble fixing... Overall I am trying to find variable station name in cell L2 of Sheet 2 in Sheet 1 and then select and copy the data from the data in "cell L2 of Sheet 2" to the last entry of that row. I have attached an example test spreadsheet of the data and a macro is within Sheet 1 called test1. Please note that cell L2 in Sheet 2 will always be different station name and the station list in Sheet 1 will change with differing station name.
The code I am using is:
Sheets("Sheet1").Select
ActiveSheet.Range("A1").Select
Dim rngFnd As Range
Set rngFnd = Worksheets("Sheet1").Range("a:A").Find(What:=Sheets("Sheet2").Range("L2").Value, LookIn:=xlFormulas, _
rngFnd.Activate
ActiveCell.Select
ActiveSheet.Range("ActiveCell").Select.Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
The code that is not working and bringing up an error is:
ActiveSheet.Range("ActiveCell").Select.Range(Selection, Selection.End(xlToRight)).Select
Any help would be greatly appreciated. Thanks so much.
Cheers,
Bookmarks