HI there
I am struggling to complete a code for the following:
Highlight all active rows which include data on one tab on a spreadsheet and copied across to another tab on the next available row. This is on the same spreadsheet
Thanks
HI there
I am struggling to complete a code for the following:
Highlight all active rows which include data on one tab on a spreadsheet and copied across to another tab on the next available row. This is on the same spreadsheet
Thanks
Hello there,
The below code should work for you.
To use it press hold down the Alt key and press the F8 button. In the space provided for macro name clear the field and then type copyall. Then select the Create option.![]()
'declare variables Dim LR As String 'select all the used cells on the worksheet entitled Sheet1 'you'll need to change Sheet1 to fit your needs Sheets("Sheet1").UsedRange.Select 'copy the section Selection.Copy 'select the worksheet entitled Sheet2 'change this to the name of the worksheet you wish to copy to Sheets("Sheet2").Select 'set the variable LR equal to the first empty row in column A LR = Range("A6555").End(xlUp).Row + 1 'select the first empty row and paste the information Range("A" & LR).Select Selection.PasteSpecial
In between the text Sub copyall and End Sub paste the above code.
Exit out of VBA. Anything that appears in green is a comment meant to help you understand the macro.
To run the code select Alt F8 again then this time select the copy all macro and select run.
Let me know if you have any questions.
Thanks!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks