Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Eva Eva is offline
external usenet poster
 
Posts: 197
Default copy a formula down up to blank cells from other sheet

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
....?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default copy a formula down up to blank cells from other sheet

Eva,

Replace

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

With

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

HTH,
Bernie
MS Excel MVP


"Eva" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Array Formula for Counting Blank & Non Blank Cells (Multiple Criteria) foofoo Excel Discussion (Misc queries) 3 February 20th 12 08:03 PM
Formula to copy multiple cells onto another sheet cdcam New Users to Excel 3 July 10th 08 12:19 AM
Copy to first Blank cell in Colum C Non blank cells still exist be Ulrik loves horses Excel Programming 2 October 8th 06 07:35 PM
I want to copy a formula n Excel but skip any blank cells Ann Excel Worksheet Functions 1 December 12th 05 06:55 PM
Formula to copy rng of cells where (value is met) to anther sheet Exit Advantage Excel Worksheet Functions 3 November 12th 05 02:59 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"