+ Reply to Thread
Results 1 to 2 of 2

autofilter, visible rows count error

  1. #1
    Registered User
    Join Date
    08-03-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    30

    autofilter, visible rows count error

    Hi everyone,
    I ran into problems while testing this bit of code, with erratic behaviour of the visible rows counter after autofilter. Please see comments on the attached workbook (autofilter_viz1.xlsm).
    Any kind soul out there who can debug me, please?


    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: autofilter, visible rows count error

    Hi florin,

    After finding zero hits after an autofilter, your data isn't expanded. The next time you find the LastRowWs it will return 1 instead of 12. I think this is why you get wrong answers.

    To fix

    After you display the number in your message box, simply unfilter the data and leave it all showing.

    Put this after the msgbox
    Please Login or Register  to view this content.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ Reply to Thread

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