VBA to copy values in a row and paste them in row on separate worksheet

daltendavis

New Member
Joined
Jun 26, 2018
Messages
37
I need help with a VBA to copy a row of #'s from one worksheet to another. It will be a daily process so I will need the new row to go below the day prior if that makes sense.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
We always need details.

Copy what rows from what sheet and paste into what sheet?

Do you mean copy all rows from Sheet(1) and add to the rows already in sheet(2)??

And do you want those rows in Sheet(1) deleted?
 
Upvote 0
Try this:
Code:
Sub Copy_Range()
'Modified 2/5/2019 4:52:49 PM  EST
Application.ScreenUpdating = False
Dim Lastrow As Long
Sheets(1).Activate
Lastrow = Sheets(2).Cells(Rows.Count, "E").End(xlUp).Row + 1
Sheets(1).Cells(6, 5).Resize(, 11).Copy Sheets(2).Cells(Lastrow, 5)
Sheets(1).Cells(6, 18).Resize(, 19).Copy Sheets(2).Cells(Lastrow, 18)
Application.ScreenUpdating = True
End Sub
 
Upvote 0
So as I create this database on sheet 2, I want the values to daily subtract from a set amount. For instance, when I copy the first set of data over from sheet 1 to sheet 2, and the value 1 is in cell 2E on sheet 2, I need this to subtract 1 from a total on sheet 3. The total on sheet 3 will represent an inventory that will be replenished every so often, and as the database on sheet 2 grows, I need the values in each column to be subtracted from the overall value on sheet 3. I am open to any suggestions as I have tried every IF statement I am familiar with and all formulas. Thanks
 
Upvote 0
Are we dealing with a completely differnt question?
If so you need to start a new posting

And be sure to always provide very specific details.

So as I create this database on sheet 2, I want the values to daily subtract from a set amount. For instance, when I copy the first set of data over from sheet 1 to sheet 2, and the value 1 is in cell 2E on sheet 2, I need this to subtract 1 from a total on sheet 3. The total on sheet 3 will represent an inventory that will be replenished every so often, and as the database on sheet 2 grows, I need the values in each column to be subtracted from the overall value on sheet 3. I am open to any suggestions as I have tried every IF statement I am familiar with and all formulas. Thanks
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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