PC Review


Reply
Thread Tools Rate Thread

Code to copy the last row formulas and paste it in the bottom row

 
 
Chetu
Guest
Posts: n/a
 
      13th Jul 2009
Hi

I have a set of data from column A to DO, This data are based on
formulas linked to another worksheet. Once the main sheet gets new
data the Sheet having formulas must copy the formulas from the last
row and paste the same in new row, so that the corresponding new data
gets updated in formula sheet.

For example

A B C
1 =([worksheet1]A1) =([worksheet1]B1) =([worksheet1]C1)
2 =([worksheet1]A2) =([worksheet1]B2) =([worksheet1]C2)

When i update the Raw file with ROW 3 details, The formula sheet
should copy the formulas from Row 2 and paste it in row 3 so that new
changes takes place.

Can you please give me the VB code for the same.
 
Reply With Quote
 
 
 
 
Patrick Molloy
Guest
Posts: n/a
 
      13th Jul 2009
to copy the last row to the next empty row

Option Explicit
Sub copylast()
With Rows(Range("A1").End(xlDown).Row)
.Copy
Range("A1").End(xlDown).Offset(1).PasteSpecial xlPasteFormulas
Application.CutCopyMode = False
End With
End Sub




"Chetu" <(E-Mail Removed)> wrote in message
news:a4a2104b-b2b3-49f8-b4e5-(E-Mail Removed)...
> Hi
>
> I have a set of data from column A to DO, This data are based on
> formulas linked to another worksheet. Once the main sheet gets new
> data the Sheet having formulas must copy the formulas from the last
> row and paste the same in new row, so that the corresponding new data
> gets updated in formula sheet.
>
> For example
>
> A B C
> 1 =([worksheet1]A1) =([worksheet1]B1) =([worksheet1]C1)
> 2 =([worksheet1]A2) =([worksheet1]B2) =([worksheet1]C2)
>
> When i update the Raw file with ROW 3 details, The formula sheet
> should copy the formulas from Row 2 and paste it in row 3 so that new
> changes takes place.
>
> Can you please give me the VB code for the same.


 
Reply With Quote
 
Chetan
Guest
Posts: n/a
 
      15th Jul 2009
Hi Molloy,

Thank you very much for the code, it works fine but i have a question.
If the main sheet has 10 updates and if i run the code in formula
sheet, it updates only one record, How can i extend this ocde so that
the formula is applied to the equal nunber of rows updated in main
sheet.

Thanks in advance.
Chetan.J
 
Reply With Quote
 
Chetan
Guest
Posts: n/a
 
      22nd Jul 2009
On Jul 15, 9:50*am, Chetan <chetu...@gmail.com> wrote:
> Hi Molloy,
>
> Thank you very much for the code, it works fine but i have a question.
> If the main sheet has 10 updates and if i run the code in formula
> sheet, it updates only one record, How can i extend this ocde so that
> the formula is applied to the equal nunber of rows updated in main
> sheet.
>
> Thanks in advance.
> Chetan.J


ANY ANSWERS PLEASE!!!!!!!!!!!!!!!!!
 
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
Bottom on a form that copy paste data in a table Fred's Microsoft Access 6 4th Jan 2008 01:15 AM
Copy and paste from last record at bottom of column jreid@ii-vi.com Microsoft Excel New Users 0 7th Feb 2006 10:25 PM
how can i copy and paste the value at the bottom of a column =?Utf-8?B?bWF2bWFu?= Microsoft Excel New Users 3 14th Nov 2004 05:38 PM
Copy and Paste to Bottom Row? andibevan Microsoft Excel Programming 1 20th Jun 2004 05:56 PM
Macro - copy entire row and paste at bottom of another sheet miker1999 Microsoft Excel Programming 4 31st Jan 2004 05:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:18 PM.