Results 1 to 8 of 8

Help! Select blank cell in a filtered list

Threaded View

  1. #7
    Registered User
    Join Date
    09-23-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    33

    Re: Help! Select blank cell in a filtered list

    Quote Originally Posted by jaslake View Post
    Hi yoko21

    Play with this
    Option Explicit
    
    Sub SubTot()
    
        Dim LR As Long, LR1 As Long
        With Sheets("Sheet1")
            
            'Find Last Row in Column A With Data (plus 1)
            LR1 = .Range("A" & .Rows.Count).End(xlUp).Row + 1
    
            'Find True Last Row With Data (plus 3)
            LR = .Cells.Find("*", .Cells(.Rows.Count, .Columns.Count), SearchOrder:=xlByRows, _
                    SearchDirection:=xlPrevious).Row + 3
            
            'Clear Data from Column B below LR1 (the Old Formula)
            .Range("B" & LR1 & ":B" & LR).ClearContents
            
            'Find the New True Last Row (plus 3)
            LR = .Cells.Find("*", .Cells(.Rows.Count, .Columns.Count), SearchOrder:=xlByRows, _
                    SearchDirection:=xlPrevious).Row + 3
            
            'Put this Formula in that Cell
            .Range("B" & LR).Formula = "=SUBTOTAL(109,B2:B" & LR - 3 & ")"
            
        End With
    End Sub
    Hi John,

    I tested your code in a 20 client list and noticed the following:
    Without filtering - It worked perfectly. The computation was made 3 cells below the last client in the list.
    Filtered. Only including the clients from 1-10 and 15-20. - The computation was made 2 cells below the last client in the list.
    Filtered. Only including clients from 1-15. No computation was made and deleted the last to data in column B.
    Last edited by yoko21; 10-05-2013 at 12:45 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Macro to select visible rows containg data in filtered list
    By knevil in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-15-2013, 01:22 PM
  2. [SOLVED] Selecting a range of blank cells in a filtered list
    By mike_vr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-05-2013, 06:24 AM
  3. Replies: 3
    Last Post: 04-11-2013, 04:13 AM
  4. 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
  5. [SOLVED] Select data in filtered list
    By Stephen Rainey in forum Excel General
    Replies: 2
    Last Post: 07-28-2006, 07:40 AM

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