![]() |
Going To The Last Empty Row and Pasting Special (Values).
I am consolidating statements being received many branches, with simple copy
& paste special (values). Any macro-code for jumping to the last empty row and pasting the data being selected and copied from the other sheet. Example: A.xls (MAIN); B.xls (BRANCH REPORT); Both reports opened; Data selected from B.xls and copied Ctrl+C; Switched back to A.xls; RUN MACRO Data pasted on excel to the last empty Cell A1 and onwards, in Paste Special (Values) mode. All the help as per your expertise shall be highly obliged. Thankfully, FARAZ! |
Going To The Last Empty Row and Pasting Special (Values).
Code to determine last used row in column A (change to suit)
Dim myLastRow as Long With sheets("Sheet1") myLastRow = .Cells(.Rows.Count,"A").End(xlUp).Row End With -- Regards, Nigel "FARAZ QURESHI" wrote in message ... I am consolidating statements being received many branches, with simple copy & paste special (values). Any macro-code for jumping to the last empty row and pasting the data being selected and copied from the other sheet. Example: A.xls (MAIN); B.xls (BRANCH REPORT); Both reports opened; Data selected from B.xls and copied Ctrl+C; Switched back to A.xls; RUN MACRO Data pasted on excel to the last empty Cell A1 and onwards, in Paste Special (Values) mode. All the help as per your expertise shall be highly obliged. Thankfully, FARAZ! |
Going To The Last Empty Row and Pasting Special (Values).
Thanx Nigel
But can you devise a "complete" procedue as to reach the first empty row of the current worksheet (whatever may the name be of the sheet)? "Nigel" wrote: Code to determine last used row in column A (change to suit) Dim myLastRow as Long With sheets("Sheet1") myLastRow = .Cells(.Rows.Count,"A").End(xlUp).Row End With -- Regards, Nigel "FARAZ QURESHI" wrote in message ... I am consolidating statements being received many branches, with simple copy & paste special (values). Any macro-code for jumping to the last empty row and pasting the data being selected and copied from the other sheet. Example: A.xls (MAIN); B.xls (BRANCH REPORT); Both reports opened; Data selected from B.xls and copied Ctrl+C; Switched back to A.xls; RUN MACRO Data pasted on excel to the last empty Cell A1 and onwards, in Paste Special (Values) mode. All the help as per your expertise shall be highly obliged. Thankfully, FARAZ! |
Going To The Last Empty Row and Pasting Special (Values).
Just replace
With sheets("Sheet1") with With Activesheet -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "FARAZ QURESHI" wrote in message ... Thanx Nigel But can you devise a "complete" procedue as to reach the first empty row of the current worksheet (whatever may the name be of the sheet)? "Nigel" wrote: Code to determine last used row in column A (change to suit) Dim myLastRow as Long With sheets("Sheet1") myLastRow = .Cells(.Rows.Count,"A").End(xlUp).Row End With -- Regards, Nigel "FARAZ QURESHI" wrote in message ... I am consolidating statements being received many branches, with simple copy & paste special (values). Any macro-code for jumping to the last empty row and pasting the data being selected and copied from the other sheet. Example: A.xls (MAIN); B.xls (BRANCH REPORT); Both reports opened; Data selected from B.xls and copied Ctrl+C; Switched back to A.xls; RUN MACRO Data pasted on excel to the last empty Cell A1 and onwards, in Paste Special (Values) mode. All the help as per your expertise shall be highly obliged. Thankfully, FARAZ! |
Going To The Last Empty Row and Pasting Special (Values).
Thanx Bob,
But where & how can I place this code in a workbook module? I also want to attach a shortcut key to such a macro so as to GOTO the cell in column A next to last row filled. Thanx again "Bob Phillips" wrote: Just replace With sheets("Sheet1") with With Activesheet -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "FARAZ QURESHI" wrote in message ... Thanx Nigel But can you devise a "complete" procedue as to reach the first empty row of the current worksheet (whatever may the name be of the sheet)? "Nigel" wrote: Code to determine last used row in column A (change to suit) Dim myLastRow as Long With sheets("Sheet1") myLastRow = .Cells(.Rows.Count,"A").End(xlUp).Row End With -- Regards, Nigel "FARAZ QURESHI" wrote in message ... I am consolidating statements being received many branches, with simple copy & paste special (values). Any macro-code for jumping to the last empty row and pasting the data being selected and copied from the other sheet. Example: A.xls (MAIN); B.xls (BRANCH REPORT); Both reports opened; Data selected from B.xls and copied Ctrl+C; Switched back to A.xls; RUN MACRO Data pasted on excel to the last empty Cell A1 and onwards, in Paste Special (Values) mode. All the help as per your expertise shall be highly obliged. Thankfully, FARAZ! |
Going To The Last Empty Row and Pasting Special (Values).
Mine was a suggested change to Nigel's code.
-- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "FARAZ QURESHI" wrote in message ... Thanx Bob, But where & how can I place this code in a workbook module? I also want to attach a shortcut key to such a macro so as to GOTO the cell in column A next to last row filled. Thanx again "Bob Phillips" wrote: Just replace With sheets("Sheet1") with With Activesheet -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "FARAZ QURESHI" wrote in message ... Thanx Nigel But can you devise a "complete" procedue as to reach the first empty row of the current worksheet (whatever may the name be of the sheet)? "Nigel" wrote: Code to determine last used row in column A (change to suit) Dim myLastRow as Long With sheets("Sheet1") myLastRow = .Cells(.Rows.Count,"A").End(xlUp).Row End With -- Regards, Nigel "FARAZ QURESHI" wrote in message ... I am consolidating statements being received many branches, with simple copy & paste special (values). Any macro-code for jumping to the last empty row and pasting the data being selected and copied from the other sheet. Example: A.xls (MAIN); B.xls (BRANCH REPORT); Both reports opened; Data selected from B.xls and copied Ctrl+C; Switched back to A.xls; RUN MACRO Data pasted on excel to the last empty Cell A1 and onwards, in Paste Special (Values) mode. All the help as per your expertise shall be highly obliged. Thankfully, FARAZ! |
All times are GMT +1. The time now is 07:45 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com