+ Reply to Thread
Results 1 to 4 of 4

Hide rows based on multiple column values

  1. #1
    Registered User
    Join Date
    04-16-2012
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2010
    Posts
    9

    Hide rows based on multiple column values

    Hi.

    I'm not sure if this is possible, but I need to write code to hide an entire row if the cells in columns B-F ALL equal either N/A, TBD, or Unknown. Or, to put it another way, if any cell in column B-F has a date, I do NOT want it to be hidden.

    For example: I would want rows 1 and 4 below to be hidden automatically (but this is just an example from a much larger worksheet).

    A B C D E F G H I J K
    11003 N/A N/A TBD TBD TBD Oil Sands Shell Labor Supply Unknown $100,000.00
    11006 N/A N/A 28-Oct-11 N/A 28-Oct-11 Wear Imperial Oil Kearl Lump Sum $6,000.00
    11007 N/A N/A N/A N/A 20-Feb-12 Wear Suncor Various Projects Lump Sum $35,000.00
    11009 N/A N/A TBD TBD Unknown South Shell Maintenance Unknown $60,000.00

    Is there a code that can do this?
    Last edited by dtanios; 05-07-2012 at 01:58 PM.

  2. #2
    Registered User
    Join Date
    04-16-2012
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Hide rows based on multiple column values

    Sorry, I didn't know it would scrunch all of that data together. I was hoping to give an example of what the rows/columns could say.

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Hide rows based on multiple column values

    It will be much clearer to view, if you attach a sample excel file.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  4. #4
    Registered User
    Join Date
    04-16-2012
    Location
    Edmonton, Canada
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Hide rows based on multiple column values

    SAMPLE.xlsm

    So it would hide 1, 4, and 7.

+ 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