Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Attempting to Selection.Filldown

Status
Not open for further replies.

schnabs

Technical User
Jan 21, 2009
50
0
0
Hello,
I am trying to use the Macro recorder to get some coding going. I need to set several filters, then autofill column A. When I use the recorder, I get
Range("A1").Select
ActiveCell.FormulaR1C1 = "Total"
Range("A1").Select
Selection.FillDown
I know from prior excel VBA coding that were the filter not on, the Selection.Filldown would be Selection.Autofill = Range(blahblah).
I was wondering if there was a way to use the autofill, or filldown, without overwriting the filtered out cells.
Thanks in advance!
 


Hi,

Try this, assuming that your filtered table is ISOLATED from all other data on the sheet...
Code:
    With [b1].CurrentRegion
        [a1] = "Total"
        Range([a1], Cells(.Rows.Count, "A")).FillDown
    End With

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Thanks Skip, I'll give it a try. The solution I found myself, while sort of messy, is selecting all visible cells in Column A, then put Total in the formula bar and press CTRL Enter.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top