#1   Report Post  
Posted to microsoft.public.excel.misc
Ryk Ryk is offline
external usenet poster
 
Posts: 36
Default Macro aid please

I have the following macro doing a filldown and it works perfectly.
Dim a As Long
a = Range("B" & Rows.Count).End(xlUp).row
Range("C6:BQ" & a).FillDown
End Sub
I then have a second sheet I would like to at the same time, autofill
down the exact number of lines the first sheet pulls down, am hoping to
have one macro pull both pages down, based on the above macro. How
would I do this, if its possibel or do i need 2 macros to do this?

Ryk

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Macro aid please

maybe...

Option Explicit
sub Testme()

Dim a As Long
with worksheets("sheet1")
a = .Range("B" & Rows.Count).End(xlUp).row
.Range("C6:BQ" & a).FillDown
end with
with worksheets("sheet2")
.range("c6:bq" & a).filldown
end with
End Sub

Ryk wrote:

I have the following macro doing a filldown and it works perfectly.
Dim a As Long
a = Range("B" & Rows.Count).End(xlUp).row
Range("C6:BQ" & a).FillDown
End Sub
I then have a second sheet I would like to at the same time, autofill
down the exact number of lines the first sheet pulls down, am hoping to
have one macro pull both pages down, based on the above macro. How
would I do this, if its possibel or do i need 2 macros to do this?

Ryk


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
Ryk Ryk is offline
external usenet poster
 
Posts: 36
Default Macro aid please


Once again Dave you came through huge! Sorry reply took so long,
working hard to finish this project by Oct 14th. Just wanted to add
yet another thank you to you, adding to my list hehe.

Thanks...

Dave aka Ryk

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Macro aid please

Glad it worked ok.

Ryk wrote:

Once again Dave you came through huge! Sorry reply took so long,
working hard to finish this project by Oct 14th. Just wanted to add
yet another thank you to you, adding to my list hehe.

Thanks...

Dave aka Ryk


--

Dave Peterson
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
error when running cut & paste macro Otto Moehrbach Excel Worksheet Functions 4 August 9th 06 01:49 PM
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
Search, Copy, Paste Macro in Excel [email protected] Excel Worksheet Functions 0 January 3rd 06 06:51 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Highlight Range - wrong macro, please edit. Danny Excel Worksheet Functions 8 October 19th 05 11:11 PM


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

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"