Question about conditional formatting

KevinLZR

New Member
Joined
May 20, 2020
Messages
5
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I have an excel file with some sort of planning.
I can't find some sort of idea on google or this forum if this is possible, so here is my question.

The planning is for every month, and every month has 4 rows (see added screenshot).
Row 1: Weekday names (in Dutch)
Row 2: Weekday numbers (in dutch
Row 3: planning
Row 4: Misc.

What I would like, is when a weekend day has been found, then highlight the 4 rows together with some color (like the screenshot).
So if za or zo, then B2:C5 would be blue.

Is this possible with conditional formatting?
 

Attachments

  • Planning.jpg
    Planning.jpg
    82.3 KB · Views: 5

Some videos you may like

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

fadee2

Active Member
Joined
Nov 7, 2020
Messages
291
Office Version
  1. 2019
Platform
  1. Windows
Hi KevinLZR,

Select your data rows, not the day names, and click conditional formatting,
1606476807892.png
.

Steps to follow for ZA...
Under New Rule, select "Use a formula to determine which cells to format".
In edit rule, type =A$1="ZA", and then click Format, and select color.

Then, steps to follow for ZO...
Under New Rule, select "Use a formula to determine which cells to format".
In edit rule, type =A$1="ZO", and then click Format, and select color.

Create two formatting rules, like this
1606477066044.png
 
Solution

KevinLZR

New Member
Joined
May 20, 2020
Messages
5
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Thanks for your reply!
If I do it like yours then nothing happens.

I select cells A3 to AE5
Then conditional format and use
=A$1="zo"

Nothing is changed.

When I change A$1 to C$2 (C2 = zo) then I get it like the screenshot.

Any ideas what I am doing wrong?
 

Attachments

  • formula.jpg
    formula.jpg
    78.6 KB · Views: 3

fadee2

Active Member
Joined
Nov 7, 2020
Messages
291
Office Version
  1. 2019
Platform
  1. Windows
Since your days a placed in 2nd row, try using A$2, instead...
=A$1="zo"

Nothing is changed.
This is because the formula is unable to find "zo" in A$1, thus nothing happens.
 

KevinLZR

New Member
Joined
May 20, 2020
Messages
5
Office Version
  1. 365
  2. 2016
Platform
  1. Windows

ADVERTISEMENT

Since your days a placed in 2nd row, try using A$2, instead...

This is because the formula is unable to find "zo" in A$1, thus nothing happens.
You are absolutely right, this must be A$2. It works now!

Thank for the help!
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
52,727
Office Version
  1. 365
Platform
  1. Windows
Rather than having two rules you could use one like
Excel Formula:
=OR(A$2="zo",A$2="za")
or another way
Excel Formula:
=LEFT(A$2)="z"
 

fadee2

Active Member
Joined
Nov 7, 2020
Messages
291
Office Version
  1. 2019
Platform
  1. Windows

ADVERTISEMENT

You are welcome..
 

KevinLZR

New Member
Joined
May 20, 2020
Messages
5
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Rather than having two rules you could use one like
Excel Formula:
=OR(A$2="zo",A$2="za")
or another way
Excel Formula:
=LEFT(A$2)="z"
His also work well indeed!
Less rules to make. (y)

Thanks!
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
52,727
Office Version
  1. 365
Platform
  1. Windows
Glad to help & thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,165
Messages
5,594,622
Members
413,918
Latest member
Mikey_C

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
Top