Results 1 to 7 of 7

Find first blank cell after Auto Filter

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706

    Find first blank cell after Auto Filter

    Greetings, Gurus.

    Suppose I am using auto filter on a range to filter down to only the blank cells in column C, and then I want to enter a formula into all those blank cells. How would I determine the range of the first blank cell? Here's what I have so far:

    Sub Macro1()
        Range("C1").AutoFilter Field:=3, Criteria1:="="
        Range("C477").Select 'Needs to be first visible cell after the autofilter is applied.
        ActiveCell.FormulaR1C1 = _
            "=VLOOKUP(RC[-2],'[PLine Listing.xlsx]COM_ REPLEN1677'!C1:C2,2,FALSE)"
        Range("C477").Copy 'Same as above
        Range("C477:C" & Cells(Rows.Count, "A").End(xlUp).Row).Select
        ActiveSheet.Paste
        Selection.Copy
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Application.CutCopyMode = False
        Range("A1").Select
        ActiveSheet.AutoFilterMode = False
    End Sub
    Thanks in advance for any help you can offer.
    Last edited by hutch@edge.net; 05-05-2010 at 11:40 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1