Conditional Formatting to highlight cells between to date

Stef9910

Board Regular
Joined
Nov 2, 2022
Messages
72
Office Version
  1. 2010
Platform
  1. Windows
Hello everyone,

I am constructing a gantt chart from cells in pivot table, I am having trouble with the conditional formatting to highlight cells between two dates,

The cells that say blank, were inputted by excel when creating the pivot table, they do not have dates in them.

I am using a pivot table so i can use slicers to filter what is required, as in metro/regional, locations and so on, i have not included that information with the below minisheet.

Any help will be greatly received,

Thank you

Stefan

For mini sheet.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQAR
1Start MonthApril
2End MonthApril1-Apr-238-Apr-2315-Apr-2322-Apr-2329-Apr-23
312345678910111213141516171819202122232425262728293012345
4StatusTypeRegionHospitalDate ReceivedStart DateEnd DateRTPPERSONSSMTWTFSSMTWTFSSMTWTFSSMTWTFSSMTWTF
5CancelledScheduledMetroHome(blank)(blank)(blank)(blank)SMITH
6HomeSMITH
7Home(blank)(blank)(blank)(blank)SMITH
8CompletedScheduledMetroHome(blank)3/04/20234/04/2023(blank)SMITH
9Home5/04/20236/04/2023(blank)SMITH
10Home(blank)4/04/20234/04/2023(blank)SMITH
11DeclinedScheduledMetroHome(blank)(blank)(blank)(blank)SMITH
12Home(blank)(blank)(blank)(blank)SMITH
13Full SitScheduledMetroHome(blank)11/04/202311/04/2023(blank)SMITH
14HomeSMITH
15Home28/04/202328/04/2023(blank)SMITH
16Home(blank)21/04/202321/04/2023(blank)SMITH
17Home(blank)14/04/202314/04/2023(blank)SMITH
18Not CompletedUnscheduledMetroHome11/04/2023(blank)(blank)13/04/2023SMITH
Sheet1
Cell Formulas
RangeFormula
J2,Q2,X2,AE2,AL2J2=J3
J3J3=I1
K3:AR3K3=J3+1
J4:AR4J4=LEFT(TEXT(J3,"ddd"),1)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
J5:AR18Expression=IF(AND($G$22<=$K$17,$H$22>$L$17),1,"")textNO
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Sorry, I think I was wrong.

Maybe this is what you need:

Book1.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQAR
1Start Month45017
2End Month4504601-Apr-2308-Apr-2315-Apr-2322-Apr-2329-Apr-23
312345678910111213141516171819202122232425262728293012345
4StatusTypeRegionHospitalDate ReceivedStart DateEnd DateRTPPERSONSSMTWTFSSMTWTFSSMTWTFSSMTWTFSSMTWTF
5CancelledScheduledMetroHome(blank)(blank)(blank)(blank)SMITH                                   
6HomeSMITH                                   
7Home(blank)(blank)(blank)(blank)SMITH                                   
8CompletedScheduledMetroHome(blank)4/3/20234/4/2023(blank)SMITH  11                               
9Home4/5/20234/6/2023(blank)SMITH    11                             
10Home(blank)4/4/20234/4/2023(blank)SMITH   1                               
11DeclinedScheduledMetroHome(blank)(blank)(blank)(blank)SMITH                                   
12Home(blank)(blank)(blank)(blank)SMITH                                   
13Full SitScheduledMetroHome(blank)4/11/20234/11/2023(blank)SMITH          1                        
14HomeSMITH                                   
15Home4/28/20234/28/2023(blank)SMITH                           1       
16Home(blank)4/21/20234/21/2023(blank)SMITH                    1              
17Home(blank)4/14/20234/14/2023(blank)SMITH             1                     
18Not CompletedUnscheduledMetroHome4/11/2023(blank)(blank)4/13/2023SMITH                                   
Sheet1
Cell Formulas
RangeFormula
J2,Q2,X2,AE2,AL2J2=J3
J3J3=I1
K3:AR3K3=J3+1
J4:AR4J4=LEFT(TEXT(J3,"ddd"),1)
J5:AR18J5= IF( AND( J$3>=$F5,J$3<=$G5), 1, "")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
J5:AR18Cell Value=1textNO
Would the formula you done work as a new rule in the conditional formatting, instead of applying the formula to each cell?
 
Upvote 0
Would the formula you done work as a new rule in the conditional formatting, instead of applying the formula to each cell?
It should ...


Book1.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQAR
1Start Month45017
2End Month4504601-Apr-2308-Apr-2315-Apr-2322-Apr-2329-Apr-23
312345678910111213141516171819202122232425262728293012345
4StatusTypeRegionHospitalDate ReceivedStart DateEnd DateRTPPERSONSSMTWTFSSMTWTFSSMTWTFSSMTWTFSSMTWTF
5CancelledScheduledMetroHome(blank)(blank)(blank)(blank)SMITH
6HomeSMITH
7Home(blank)(blank)(blank)(blank)SMITH
8CompletedScheduledMetroHome(blank)4/3/20234/4/2023(blank)SMITH
9Home4/5/20234/6/2023(blank)SMITH
10Home(blank)4/4/20234/4/2023(blank)SMITH
11DeclinedScheduledMetroHome(blank)(blank)(blank)(blank)SMITH
12Home(blank)(blank)(blank)(blank)SMITH
13Full SitScheduledMetroHome(blank)4/11/20234/11/2023(blank)SMITH
14HomeSMITH
15Home4/28/20234/28/2023(blank)SMITH
16Home(blank)4/21/20234/21/2023(blank)SMITH
17Home(blank)4/14/20234/14/2023(blank)SMITH
18Not CompletedUnscheduledMetroHome4/11/2023(blank)(blank)4/13/2023SMITH
Sheet1a
Cell Formulas
RangeFormula
J2,Q2,X2,AE2,AL2J2=J3
J3J3=I1
K3:AR3K3=J3+1
J4:AR4J4=LEFT(TEXT(J3,"ddd"),1)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
J5:AR18Expression= IF( AND( J$3>=$F5,J$3<=$G5), 1, "")textNO
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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