Results 1 to 3 of 3

Blanks causing issue when autofiltering as you type in Textbox

Threaded View

  1. #1
    Registered User
    Join Date
    04-08-2013
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    2

    Blanks causing issue when autofiltering as you type in Textbox

    Hello all, I'm new to the forums and new to VBA coding.

    I have a spreadsheet that contains two columns which have a list of Last and First names.

    I wish to type into a Textbox on the Worksheet and have the spreadsheet filter out the list of names as I type into the Textbox.

    I have followed the code from this link, http://www.excelforum.com/excel-gene...-you-type.html
    and everything works perfectly so long as all the cells contain something and are not blank.


    My problem is, if, for example, I have the First name "Kim" and I search for "Kim" in the First Name textbox, I get all the records that contain "Kim" in the filter.

    But if I have the First name "Kim" and have the Last name blank, when I search for any name in the Last Name textbox, then clear the Textbox, the record that contained the blank disappears, and I have to go to Data -> Filter to undo and redo so the record appears.


    I was wondering if there was anyway around this, or must these records always contain at least something in all cells?

    I appologise if that doesn't make much sence, but I hopefully have attached a dummy spreadsheet to this post to show the problem I am having.
    This is a very basic spreadsheet, and eventually I will populate it with more data that I can search and filter through, and I may not have the information for each cell, and it would be a bit annoying to have to put "-" for all the cells that would otherwise be blank.

    Thanks in advance!
    Attached Files Attached Files

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