PC Review


Reply
Thread Tools Rate Thread

copy a formula down up to blank cells from other sheet

 
 
Eva
Guest
Posts: n/a
 
      25th Feb 2008
I have two sheets:Master with all data and sheet2 with some columns that are
the same as master. I set a formula simply links some data in Sheet2.
I need to copy this formula in sheet2 down up to last row in master sheet.
I started working on the macro, but I am stuck. Can you help?
Sub Macro7()

Sheets("Master").Select

Dim LastRow As Long

LastRow = Cells(Rows.Count, 1).End(xlUp).Row

'MsgBox OstatniWiersz


Sheets("Sheet2").Select
Range("a2:s2").Select
Selection.Copy
....?
 
Reply With Quote
 
 
 
 
Bernie Deitrick
Guest
Posts: n/a
 
      26th Feb 2008
Eva,

Replace

Range("a2:s2").Select
Selection.Copy
....?

With

Range("a2:s2").Copy Range("a2:s" & LastRow)

HTH,
Bernie
MS Excel MVP


"Eva" <(E-Mail Removed)> wrote in message
news:F7CA0DCE-0B13-44FB-813A-(E-Mail Removed)...
>I have two sheets:Master with all data and sheet2 with some columns that are
> the same as master. I set a formula simply links some data in Sheet2.
> I need to copy this formula in sheet2 down up to last row in master sheet.
> I started working on the macro, but I am stuck. Can you help?
> Sub Macro7()
>
> Sheets("Master").Select
>
> Dim LastRow As Long
>
> LastRow = Cells(Rows.Count, 1).End(xlUp).Row
>
> 'MsgBox OstatniWiersz
>
>
> Sheets("Sheet2").Select
> Range("a2:s2").Select
> Selection.Copy
> ...?



 
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
Formula to copy multiple cells onto another sheet cdcam Microsoft Excel New Users 3 10th Jul 2008 12:19 AM
Copy non blank cells from 1 sheet to multuiple sheets waxback Microsoft Excel Programming 4 16th Jun 2008 09:28 PM
Copy to first Blank cell in Colum C Non blank cells still exist be =?Utf-8?B?VWxyaWsgbG92ZXMgaG9yc2Vz?= Microsoft Excel Programming 2 8th Oct 2006 07:35 PM
I want to copy a formula n Excel but skip any blank cells =?Utf-8?B?QW5u?= Microsoft Excel Worksheet Functions 1 12th Dec 2005 06:55 PM
Formula to copy rng of cells where (value is met) to anther sheet =?Utf-8?B?RXhpdCBBZHZhbnRhZ2U=?= Microsoft Excel Worksheet Functions 3 12th Nov 2005 02:59 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:17 AM.