# conditional formatting based on 5 named ranges

1. ## 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.

2. ## 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.``

3. ## 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. ## Re: conditional formatting based on 5 named ranges

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

5. ## 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. ## 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. ## 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.

8. ## 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.``

9. ## 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.

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

#### 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