+ Reply to Thread
Results 1 to 9 of 9

conditional formatting based on 5 named ranges

  1. #1
    Forum Contributor
    Join Date
    02-16-2008
    Location
    Mansfield, TX
    Posts
    324

    conditional formatting based on 5 named ranges

    i edited this thread becuase I realized why I was getting the wrong results, however, I am completely clueless on how I need to accomplish the task below.

    I need to apply formatting based on five named ranges on another sheet. if the values in cell F1:F1000 appears in the named range "datestore" and the corresponding value in range h2:h1000 appears any of the named ranges "date1" through "date5" I would like it to fill the cell yellow.
    Last edited by dcgrove; 01-06-2010 at 06:11 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,902

    Re: conditional formatting based on 5 named ranges

    Haven't tested it, but I think you might need something more like this:

    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    02-16-2008
    Location
    Mansfield, TX
    Posts
    324

    Re: conditional formatting based on 5 named ranges

    NBVC thank you for your suggestion, i was in the middle of editing the original post when you replied. I realized after posting that my formula was not going to work for what I need to do.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,902

    Re: conditional formatting based on 5 named ranges

    Just change all the F1 references within the OR statement to H1...

  5. #5
    Forum Contributor
    Join Date
    02-16-2008
    Location
    Mansfield, TX
    Posts
    324

    Re: conditional formatting based on 5 named ranges

    NBVC, thanks for the help, unfortunately, i am still stuck. I have tried a couple of different versions of the formula with no success. Replacing the cell references in the OR statement did not work, so I created two new named ranges, "histore" is the range f1:f100 and "hidate" is h1:h1000.

    Both of these did not highlight the cell when I put good test values in it.

    =AND(MATCH(histore,datestore,0),OR(MATCH(hidate,date1,0), MATCH(hidate,date2,0), MATCH(hidate,date3,0), MATCH(hidate,date4,0), MATCH(hidate,date5,0)))

    =AND(MATCH(histore,datestore,0),OR(MATCH(hidate,date1,0), MATCH(hidate,date2,0), MATCH(hidate,date3,0), MATCH(hidate,date4,0), MATCH(hidate,date5,0)))

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,902

    Re: conditional formatting based on 5 named ranges

    the first item in each of the MATCH() functions should be a single cell reference, like F1 and H1... which would correspond to the top most cell in your selection to highlight...

    so it should be like I wrote it,

    =AND(MATCH(F1,datestore,0),OR(MATCH(H1,date1,0), MATCH(H1,date2,0), MATCH(H1,date3,0), MATCH(H1,date4,0), MATCH(H1,date5,0)))

    Where you would be selecting a range in column F, starting at F1. Then you would be looking to find F1 in datastore and at the same time looking for H1 in either of date1 to date5 ranges.

  7. #7
    Forum Contributor
    Join Date
    02-16-2008
    Location
    Mansfield, TX
    Posts
    324

    Re: conditional formatting based on 5 named ranges

    I applied your formula to cell f2 in the sheet labeled "new hi db" and still do not get the formatting to appear. I have uploaded a test sheet to make things easier.

    I appreciate your help!
    Attached Files Attached Files

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,902

    Re: conditional formatting based on 5 named ranges

    See attached...

    I think you'll need the second version with the ISNUMBER() functions


    I deleted the formatting you had, then selected column F and applied this formula:

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

  9. #9
    Forum Contributor
    Join Date
    02-16-2008
    Location
    Mansfield, TX
    Posts
    324

    Re: conditional formatting based on 5 named ranges

    That worked perfectly. If you weren't 1500 miles away, I would buy you a beer. You have no idea how much work you just saved me.

+ 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