+ Reply to Thread
Results 1 to 11 of 11

Foolproof Advance Filter criteria - blank cells

  1. #1
    Registered User
    Join Date
    11-27-2008
    Location
    Everywhere
    Posts
    11

    Foolproof Advance Filter criteria - blank cells

    Hi All,

    This is a sort-of bizarre query I have.

    I have a large array of data which I'm filtering out and copying to a new spreadsheet using an advanced filter. I have 2 filter criteria, one works... the other doesn't.

    The second criteria is supposed to filter out rows that have blank cells in column C or D. I tried various things:

    a. at first I tried following:
    Column header: Name |Surname
    Criteria: <>"" |<>""

    b. since it didn't work I tried that
    Column header: Name |Surname
    Criteria: =<>""""" |=<>"""""

    I also tried <>0 and <>null with absolutely no joy.

    c. once I figured out that doesn't work either, I tried:
    Column header: (empty)
    Criteria: =OR(NOT(ISBLANK(C2)),NOT(ISBLANK(D2)))

    now, the last one did have some effect, most of the empty-celled rows have been filtered out. However the filter persistently picks up ONE row that has blanks in column C2 and D2. I checked the data to check if the cell is really blank and it's as blank as it gets.

    Obviously, I need help. It's been 3 days and I still can't figure out what's wrong with my filter. Is there a way of fool proofing the criteria, so that it will filter out all cells that are or appear to blank?

    Thanks
    Seler
    (PS. no, I don't have single quotes in those cells. Nor spaces. they are really very blank.)

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Hi,
    if you use the Autofilter, does it recognize the "blank" cells as being "blank" ?

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480
    Why not use the Auto Filter instead?

  4. #4
    Registered User
    Join Date
    11-27-2008
    Location
    Everywhere
    Posts
    11
    Hi arthurbr,

    Yes, it does recognize it as a blank. Autofilter is perfectly comfy with my data.

    JJ

  5. #5
    Registered User
    Join Date
    11-27-2008
    Location
    Everywhere
    Posts
    11
    davesexcel - Obvious reason - I need it for a bigger thing! I only want certain columns to be returned in a different spreadsheet AND I need to have it done 156 times, so this filter is a part of a macro that does it for me...

    As long as the filter returns blank cells in columns C and D a part of the macro will not work.

    As well, for the sake of principle - why would autofilter be a solution when I WANT to use advance filter? shouldn't it work just as well?

    Seler

  6. #6
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    why would autofilter be a solution when I WANT to use advance filter? shouldn't it work just as well
    Well it doesn't seem to ;-)

  7. #7
    Registered User
    Join Date
    11-27-2008
    Location
    Everywhere
    Posts
    11
    Well it doesn't seem to ;-)
    You can't imagine how Delighted I am that it doesn't :> Just the fact I have to deal with it makes me feel nauseous....

  8. #8
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Seler, could you post a small sample of your data including the " blank cells" ?

  9. #9
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    This will hide all rows that have blank cells in C or D

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  10. #10
    Registered User
    Join Date
    11-27-2008
    Location
    Everywhere
    Posts
    11
    Hi Roy,

    I have no problem with Hiding the data, I have a problem with extracting data to another sheet based on criteria of the filter. Hiding it doesn't make much of a difference, you know.

    Hi arthurbr,

    I wouldn't feel entirely comfortable posting the data for the whole world wide web to see - while it's not strictly confidential, it is rather sensitive. Would it be ok with you if I sent it to you via email?

    Cheers,
    Seler

  11. #11
    Registered User
    Join Date
    11-27-2008
    Location
    Everywhere
    Posts
    11
    Hi Guys,

    Just so you know - I managed to resolve it by adding following piece of code into the macro:

    Please Login or Register  to view this content.
    This searches for all empty cells in colums B and C of the data in the filter results and deletes entire row if an empty cell is found.

    a bit of an overkill, but works...

    Cheers,
    Seler

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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