Possibility conditional formatting within range of cells

Kick4s

New Member
Joined
Aug 27, 2019
Messages
9
Hello everyone,

I have some troubles with conditional formatting, see example below:

ABCD
1Date25-Aug-201926-Aug-201927-Aug-2019
2activity18

3activity2
8
4activity3

8

<tbody>
</tbody>

My goal is to change the colour of the "activity" cell when:

"B2 to D2 is not blank

and

date B1 to D1 has expired"

From my understanding, the (start of the) formula should be:
= AND (NOT (BLANK (B2) ) ; B1<today ()="" )<today())<today="" ())<today())<today())"<today())<today())".="" but="" this="" formula="" only="" takes="" one="" cell="" in="" account.=""
< TODAY () )<today())


Is it possible to make this work with a range of cells without having to put in multiple conditional formats?

I work with the Dutch version of Excel 2010 so ';' and ',' are different than the international version, I will clarify more if needed.

Many thanks in advance!</today())
</today>
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Welcome to the Board!

The function is ISBLANK, not BLANK.

"B2 to D2 is not blank

and

date B1 to D1 has expired"
Are you saying that ALL of B2:D2 cannot be blank, and ALL of B1:D1 must be expired?
I wasn't sure if you for the condition to be met, ALL three must be met, or just any ONE must be met.
 
Last edited:
Upvote 0
Select A2:A4 & use this formula
=SUMPRODUCT(($B$1:$D$1<=TODAY())*(B2:D2<>""))
 
Upvote 0
Welcome to the Board!

The function is ISBLANK, not BLANK.


Are you saying that ALL of B2:D2 cannot be blank, and ALL of B1:D1 must be expired?
I wasn't sure if you for the condition to be met, ALL three must be met, or just any ONE must be met.

Hi Joe,

Thanks for the quick response.

In this case the following conditions should be met:
- All of B2:D2 cannot be blank
- Either B1, C1 or D1 must be expired, depending of which of B2, C2 or D2 is not blank.

So for example: if B2 is not blank and B1 is expired, then change colour "activity" cell (A2).
 
Upvote 0
@Fluff

The formula works, thanks! I had to make a couple of translation changes but other than that, the formula worked.

@Joe4

Thanks anyway for your help!

:biggrin:
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0
Hi again,

I have used the formula in my Excel sheet but unfortunately something goes wrong.

If I select a range of cells and use the formula, given in previous post, the following happens (see example below):

Example:

The table below shows what happens if the formula =SUMPRODUCT(($B$1:$D$1<=TODAY())*(B2:D2<>"")) is used for the selected cells (A2:A4).

ABCD
1date28-Aug-201929-Aug-201930-Aug-2019
2activity18
3activity28
4activity38

<tbody>
</tbody>

Cells A2:A4 turns green, which is not what it supposed to do. Only cell A2 should turn green.

Do I have to change the formula for each row, so:

to change colour cell A3: =SUMPRODUCT(($B$1:$D$1<=TODAY())*(B3:D3<>""))
to change colour cell A4:
=SUMPRODUCT(($B$1:$D$1<=TODAY())*(B4:D4<>""))

or am I missing something?
 
Upvote 0
No you don't need to change the formula, are the "blank cells" actually empty or do they contain a formula?
 
Upvote 0
No you don't need to change the formula, are the "blank cells" actually empty or do they contain a formula?

Hi Fluff,

If you mean the "blank" cells mentioned in the formula, then yes, they are empty.

The only cells that contains a formula are the selected cells.
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,487
Members
448,967
Latest member
visheshkotha

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top