Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding a new row in VB
Hi
I have a rolling data sheet which I need to update with the previous day's data each morning. eg if today is the 03/05 then I add a new row today for the 02/05. I would like to create a macro to copy the last row of data and copy it down which should update the date. can anyone help me with how to do this? Greatly appreciated Soph |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding a new row in VB
Dim LastRow As Long
LastRow = Cells(Rows.Count, "A").End(xlUp).Row Rows(LastRow).Copy Cells(LastRow + 1, "A") Cells(LastRow + 1, "A").Value = Cells(LastRow, "A") - 1 -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "soph" wrote in message ... Hi I have a rolling data sheet which I need to update with the previous day's data each morning. eg if today is the 03/05 then I add a new row today for the 02/05. I would like to create a macro to copy the last row of data and copy it down which should update the date. can anyone help me with how to do this? Greatly appreciated Soph |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Just adding | Excel Discussion (Misc queries) | |||
adding some rows in the middle of adding some other rows | Excel Programming | |||
Adding every 5th row (e.g. B5 + B10 + B15 etc) | Excel Discussion (Misc queries) | |||
Adding 1 | Excel Programming | |||
Adding with & | Excel Worksheet Functions |