Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Filldown code

I am using filldown code that works perfectly in most cases. However,
sometimes the workbook I create has 0 or 1 row of data. I never know when
this will happen because I am automatically creating the workbook based on
differences between two other workbooks. Is there a way to tell the filldown
code only to work if there is more than 1 row of data in a workbook?

Here is the code I am using now:

With ActiveSheet
Lrow = Range("A" & Rows.Count).End(xlUp).Row
Range("F1:F" & Lrow).FillDown
End With

Thanks for any help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Filldown code

Maybe...

With ActiveSheet
Lrow = .Range("A" & .Rows.Count).End(xlUp).Row
if lrow 1 then
.Range("F1:F" & Lrow).FillDown
end if
End With



aileen wrote:

I am using filldown code that works perfectly in most cases. However,
sometimes the workbook I create has 0 or 1 row of data. I never know when
this will happen because I am automatically creating the workbook based on
differences between two other workbooks. Is there a way to tell the filldown
code only to work if there is more than 1 row of data in a workbook?

Here is the code I am using now:

With ActiveSheet
Lrow = Range("A" & Rows.Count).End(xlUp).Row
Range("F1:F" & Lrow).FillDown
End With

Thanks for any help.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Filldown code

That worked perfectly. Thanks!

"Dave Peterson" wrote:

Maybe...

With ActiveSheet
Lrow = .Range("A" & .Rows.Count).End(xlUp).Row
if lrow 1 then
.Range("F1:F" & Lrow).FillDown
end if
End With



aileen wrote:

I am using filldown code that works perfectly in most cases. However,
sometimes the workbook I create has 0 or 1 row of data. I never know when
this will happen because I am automatically creating the workbook based on
differences between two other workbooks. Is there a way to tell the filldown
code only to work if there is more than 1 row of data in a workbook?

Here is the code I am using now:

With ActiveSheet
Lrow = Range("A" & Rows.Count).End(xlUp).Row
Range("F1:F" & Lrow).FillDown
End With

Thanks for any help.


--

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
Filldown Formula KWhamill Excel Programming 3 July 16th 08 08:30 PM
Filldown? & Cmb? Jennifer Excel Programming 1 May 16th 06 04:28 AM
FillDown Macro Nick Junod Excel Worksheet Functions 3 February 6th 06 10:10 PM
Macro Filldown Hirsch Excel Worksheet Functions 4 June 6th 05 06:25 PM
FillDown Mike Fogleman Excel Programming 2 November 18th 03 10:46 PM


All times are GMT +1. The time now is 06:54 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"