Solved

# Excel - problem with conditional formatting

Posted on 2011-04-21
243 Views
I have a problem with some conditional formatting.  The attached spreadsheet should describe the problem.
I want to have a list of 5 workdays (B2 to B6).  Next to those are cells that can be selected with an "x".

Below in the spreadsheet is a list of dates (B10 to >>>>)

I simply want to bold up the dates in the list if their corresponding weekday in the top list is ticked (ie an "x" in the adjacent box).

I just cannot get it to work properly.  In the spreadsheet, Tuesday and Wednesday work fine, Thursday and Friday don't work and Monday bolds up Saturday, Sunday and Monday!!

It's driving me nuts and I'm sure it's just a simple mistake or lack of understanding.

The formulas in columns D and E are just debug (and there seems to be a fundamental problem with Friday!!)

Hope someone can throw some light on it.

Best regards

Richard
Conditional-formatting.xls
0
Question by:rltomalin

LVL 11

Accepted Solution

try this formula;

=SUMPRODUCT((\$B\$2:\$B\$6=TEXT(B10,"Dddd"))*(\$C\$2:\$C\$6="x"))
0

LVL 11

Expert Comment

The erroneous results you are getting are a mystery and appears to be a bug!
0

LVL 18

Assisted Solution

Hi,

LOOKUP works only if your data is sorted. Another option would be

=INDEX(\$C\$2:\$C\$6,MATCH(TEXT(B10,"dddd"),\$B\$2:\$B\$6,0))="x"

Kris
0

Author Closing Comment

Hi Guys

Thanks for that.  Both solutions seem to work fine - so I will split the points.

Regards

Richard
0

## Featured Post

Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…