Transferring entire row to another page in same book

0 Agios

Well-known Member
Joined
Feb 22, 2004
Messages
570
Office Version
  1. 365
I Have this code but does not work, any help please, i am trying to transfer the entire row to another page, and then hide original row

With ActiveWorkbook

ActiveCell.EntireRow.Select
Selection.Copy

Sheets("Won Jobs").Activate
Cells(Rows.Count, "E").End(xlUp).Offset(1, 0).Select
ActiveCell.EntireRow.Select
Selection.Paste

End With
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Well this would be very difficult to work.

So if you select any cell in your entire worksheet you want a script to run

I would think you might say if I double click any cell in column E of my worksheet I want this row
Copied to a sheet named Won Jobs and paste to lastrow+1 in column E with data

And then hide that row on original sheet.
Would this work?
 
Upvote 0
Try this:
VBA Code:
Private Sub CommandButton1_Click()
'Modified  5/10/2021  5:38:40 PM  EDT
Dim Lastrow As Long
Dim r As Long
r = ActiveCell.Row
Lastrow = Sheets("Won Jobs").Cells(Rows.Count, "E").End(xlUp).Row + 1

ActiveCell.EntireRow.Copy Sheets("Won Jobs").Cells(Lastrow, 1)
Rows(r).Hidden = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,020
Messages
6,122,709
Members
449,093
Latest member
Mnur

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top