PC Review


Reply
Thread Tools Rate Thread

Adding a new row in VB

 
 
soph
Guest
Posts: n/a
 
      27th May 2008
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 With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      27th May 2008
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" <(E-Mail Removed)> wrote in message
news:802677A1-1DEE-4F9F-B035-(E-Mail Removed)...
> 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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help please, Having trouble finding/adding users for purpose of granting permissions or adding them to groups in a win 2k domain on an XP workstation. rmalph@happy.days Microsoft Windows 2000 Security 4 16th Oct 2004 07:11 AM
Need help please, Having trouble finding/adding users for purpose of granting permissions or adding them to groups in a win 2k domain on an XP workstation. rmalph@happy.days Microsoft Windows 2000 New Users 1 12th Oct 2004 07:13 PM
Need help please, Having trouble finding/adding users for purpose of granting permissions or adding them to groups in a win 2k domain on an XP workstation. rmalph@happy.days Microsoft Windows 2000 Deployment 0 11th Oct 2004 11:39 PM
Need help please, Having trouble finding/adding users for purpose of granting permissions or adding them to groups in a win 2k domain on an XP workstation. rmalph@happy.days Microsoft Windows 2000 0 11th Oct 2004 11:37 PM
Need help please, Having trouble finding/adding users for purpose of granting permissions or adding them to groups in a win 2k domain on an XP workstation. rmalph@happy.days Microsoft Windows 2000 Deployment 0 11th Oct 2004 11:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:04 AM.