Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Filldown Formula | Excel Programming | |||
Filldown? & Cmb? | Excel Programming | |||
FillDown Macro | Excel Worksheet Functions | |||
Macro Filldown | Excel Worksheet Functions | |||
FillDown | Excel Programming |