View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default 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