Conditional Formatting a range of cells based on the content of 1

mattstan2012

New Member
Joined
May 23, 2024
Messages
13
Office Version
  1. 365
Platform
  1. Windows
OK. So I want to highhlight a range of cells based on today's date. Using Conditional Formatting, I can select an entire worksheet and ask it to highlight a cell if it has today's date - see below where it's highlighted the single cell that has today's date (3rd June 2024).

How can I ask it to search for today's date and highlight (in the example below for today's date) not only cell O23, but also O23:T39 - so essentially all of today's rota? But then tomorrow, it will highlight U23:Z39 and next Sunday, I42:N58?

If this is indeed possible?

I'm thinking this can probably only be done using visual basic?

Any thoughts would be very welcome with massive thanks in advance


Excel Rota.png
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
The earlier post I made was confusing. Try this:

Book1
ABCDEFGHIJKLMNOP
12024-06-012024-06-012024-06-012024-06-022024-06-022024-06-022024-06-032024-06-032024-06-032024-06-042024-06-042024-06-042024-06-052024-06-052024-06-05
2Target Date: (you can use Today() function, I'm using this for testing/development223238222438323524322940304226
32024-06-02432439294124233531302543344140
4363844394223253442334426283943
5304433373435392135433626353322
6342344392138383625262827262538
7402723312123372240373522253538
8433121323643252822424437374238
9253931323635254425344039213640
10213029382221413036252237314229
11442824372932392636343721252932
12402423392242444325323930333425
13314322282830283644222941333340
14
15
162024-06-012024-06-022024-06-032024-06-042024-06-05
17223238222438323524322940304226
18432439294124233531302543344140
19363844394223253442334426283943
20304433373435392135433626353322
21342344392138383625262827262538
22402723312123372240373522253538
23433121323643252822424437374238
24253931323635254425344039213640
25213029382221413036252237314229
26442824372932392636343721252932
27402423392242444325323930333425
28314322282830283644222941333340
Sheet4
Cell Formulas
RangeFormula
E1:P1,N16,K16,H16,E16E1=B1+1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D17:D28,G17:G28,J17:J28,M17:M28,P17:P28Expression=($A$3=B$16)textNO
C17:C28,F17:F28,I17:I28,L17:L28,O17:O28Expression=($A$3=B$16)textNO
B17:B28,E17:E28,H17:H28,K17:K28,N17:N28Expression=($A$3=B$16)textNO
B2:P13Expression=($A$3=B$1)textNO
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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