+ Reply to Thread
Results 1 to 7 of 7

Find and select first #N/A cell in a filtered selection....

Hybrid View

  1. #1
    Registered User
    Join Date
    01-20-2014
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    32

    Find and select first #N/A cell in a filtered selection....

    Hi I am a complete novice and would like to know how to search and find, and select the first #N/A within my data.

    Columns("C:C").Select
        Selection.Find(What:="#N/A", After:=ActiveCell, LookIn:=xlFormulas, _
            LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
            MatchCase:=False, SearchFormat:=False).Activate
    Above is my current filter.

    After this I would like to find first N/A to apply my Vlookup.

    Any pointers are greatly appreciated.

    Thank you.
    Last edited by Chris Acheson; 01-23-2014 at 09:02 AM.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Find and select first #N/A cell in a filtered selection....

    Sub findcopy11()
    Dim rng As Range
    
    Application.ScreenUpdating = 0
    
             
                 With ActiveSheet.Columns(3)
                         Set rng = .Find("#N/A", LookIn:=xlValues, LookAt:=xlWhole)
                            If Not rng Is Nothing Then
                                rng.Select
                            End If
                 End With
         
        
         Application.CutCopyMode = 0
    
    Set rng = Nothing
    
    Application.ScreenUpdating = True
    End Sub

  3. #3
    Registered User
    Join Date
    01-20-2014
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Find and select first #N/A cell in a filtered selection....

    Thank you soooo much. works like a dream

    I do have one last question if possible.....

    Range("C23").Select
        ActiveCell.FormulaR1C1 = "=SUBTOTAL(9,R[-2]C:R[-1]C)"
        Range("C23:C" & LastRow).FillDown
    seems to fill down but does not include last row of data.

    I would like fill down to do just that until last recognised cell in range. i.e xldown up.... if there is such a command.

    Thank you kindly for your time.

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Find and select first #N/A cell in a filtered selection....

    Range("C23:C" & LastRow+1).FillDown

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Find and select first #N/A cell in a filtered selection....

    Sub Macro1()
    
    With ActiveSheet
    
       .Range("C23:C" & .Cells.Find("*", , , , xlByRows, xlPrevious).Row).FormulaR1C1 = "=SUBTOTAL(9,R[-2]C:R[-1]C)"
    End With
    End Sub

  6. #6
    Registered User
    Join Date
    01-20-2014
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Find and select first #N/A cell in a filtered selection....

    Thanks bud.... spot on.

  7. #7
    Registered User
    Join Date
    01-20-2014
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Find and select first #N/A cell in a filtered selection....

    Thanks for pointing out :-)

    I look forward to any feedback.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Help! Select blank cell in a filtered list
    By yoko21 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-05-2013, 01:02 PM
  2. [SOLVED] select one cell in a filtered range
    By ahoe800 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-10-2013, 12:07 PM
  3. Cell results from a filtered selection
    By stonedbloke in forum Excel General
    Replies: 8
    Last Post: 05-28-2012, 07:18 AM
  4. Replies: 2
    Last Post: 05-15-2012, 02:08 AM
  5. Select the first cell of a filtered list?
    By Shane Moore in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-22-2010, 03:18 PM

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