Greetings all.
New here, trying to write a macro, something I don't do much but would like to learn.
All I want to do right now is insert a column and add today's date, then copy all of the rows that are being used in the spreadsheet and append them to the end of another spreadsheet.
I recorded a macro as I went through the steps, but now I'm having problems changing the absolute references to the calculated references I need.
So - here is the relevant section of macro I recorded:
Columns("A:A").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("B2").Select
Selection.End(xlDown).Select
ActiveCell.Value = Date
Selection.AutoFill Destination:=Range("A2:A9"), Type:=xlFillCopy
Selection.End(xlDown).Select
Rows("2:9").Select
Selection.Copy
Sheets("Cumulative").Select
Selection.End(xlDown).Select
ActiveSheet.Paste
In the example I was working with, the last used row was 9. Now, what's the best way to get my macro to go to the last row, not row 9?
Thank you very much for your help.
New here, trying to write a macro, something I don't do much but would like to learn.
All I want to do right now is insert a column and add today's date, then copy all of the rows that are being used in the spreadsheet and append them to the end of another spreadsheet.
I recorded a macro as I went through the steps, but now I'm having problems changing the absolute references to the calculated references I need.
So - here is the relevant section of macro I recorded:
Columns("A:A").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("B2").Select
Selection.End(xlDown).Select
ActiveCell.Value = Date
Selection.AutoFill Destination:=Range("A2:A9"), Type:=xlFillCopy
Selection.End(xlDown).Select
Rows("2:9").Select
Selection.Copy
Sheets("Cumulative").Select
Selection.End(xlDown).Select
ActiveSheet.Paste
In the example I was working with, the last used row was 9. Now, what's the best way to get my macro to go to the last row, not row 9?
Thank you very much for your help.