+ Reply to Thread
Results 1 to 8 of 8

Provide list of cell addresses that don't meet criteria

  1. #1
    Registered User
    Join Date
    03-17-2011
    Location
    Guelph, Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    63

    Provide list of cell addresses that don't meet criteria

    Greetings All:

    As part of regular maintenance on Large Templates, I need to check all cells in Column B - Must have either and * or a (small) x. I used to use a 'standard' if statement in column K, however, the every increasing size of the templates is making this a very time consuming process - Not to mention, boring!

    I'm hoping there would be a way to check all the cells in column B, (in used range), and have a message pop up, listing / indicating which cell(s) do NOT meet the criteria.

    If such a pop up message cannot be on a 'floating' message box, or?? I'd prefer to use a new spread-sheet to show the list - if that's the only way. I can't take any chance that the process would harm the template in any way.

    Looking forward to response(s).
    Thank-you

  2. #2
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: Provide list of cell addresses that don't meet criteria

    This should do it. ALso, see attached example.

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

  3. #3
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: Provide list of cell addresses that don't meet criteria

    that macro anticipates a header in the B column and runs on the active sheet. also, if you run it over again, it will bonk because i named the sheet something specific....can't name another sheet that same name.

    Please Login or Register  to view this content.

    Add the & thisworkbook.sheets.count to avoid the rename issue...
    Last edited by GeneralDisarray; 09-20-2011 at 03:25 PM. Reason: forgot code tags

  4. #4
    Registered User
    Join Date
    03-17-2011
    Location
    Guelph, Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    63

    Re: Provide list of cell addresses that don't meet criteria

    GeneralDisarray:

    Tried the code - would not work for me, on my test sheet.
    Using F8 to walk thru it, it seems to cycle thru many more times than there are lines in my test sheet. Also, no "example Report" sheet was created.

    When I saw your test sheet, I picked up on the fact that I had neglected to indicate that I'm still on Excel 2003. Sorry about the over-sight!!
    I'm hoping that a slight modification to the code will accomodate the ancients.

    A: I need the code to start running in cell B1.
    B: Judging by your sample, I expect that a blank cell does not foul the intent of determining last active cell - Correct?

    Please Login or Register  to view this content.
    Again, my apologies. When so many people are kind enough to lend their time and expertise, the least I can do is state all the required facts. Next time better!!
    BJ

  5. #5
    Registered User
    Join Date
    03-17-2011
    Location
    Guelph, Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    63

    Re: Provide list of cell addresses that don't meet criteria

    Good day:
    Further trying of your code and sample. Interestingly enough, it seems to work, even though I only have Excel 2003.
    When I changed the following to 1 it only picks up cell b1 as being 'bad'.
    Please Login or Register  to view this content.
    If at all possible, a blank cell should also be recognized as 'bad'.

    As much ( or actually little) that I understand from the code, I've been trying to interpret / compare with code from 2003, to see if that is the problem - ie: not working on my test sheet. So far I'm striking out. If you could help me out of this situation, I'd be more than a little grateful.

    BJ

  6. #6
    Registered User
    Join Date
    03-17-2011
    Location
    Guelph, Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    63

    Re: Provide list of cell addresses that don't meet criteria

    In case anyone else is looking for something similar, for Excel 2003, the following is the working copy of what I now have in my system.
    The first part was the only way I could think of to look after blank (empty) cells.
    I don't doubt that the whole thing could be set up more efficiently, but at least I'm rolling for now.
    Much thanks to GeneralDisarray - I never would have come even close to figuring out his supplied code.

    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Provide list of cell addresses that don't meet criteria

    hi, Beejay, if it's still of any interest to you, there are options without looping each cell, this is one of them, please check attachment, push the button
    Attached Files Attached Files
    Last edited by watersev; 09-22-2011 at 03:03 PM.

  8. #8
    Registered User
    Join Date
    03-17-2011
    Location
    Guelph, Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    63

    Re: Provide list of cell addresses that don't meet criteria

    watersev:
    Amazing!! The way you guys can do programming makes me very humble.
    I always learn a lot (be it very slowly) from coding supplied by experts like yourself.
    Thank-You.

+ 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