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.
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
Thanks a million!!! Might have a follow up but this is great for right now thank you!!!
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