Conditional Formatting Of One Array Into Another

rohitnigade

New Member
Joined
Oct 7, 2022
Messages
9
Office Version
  1. 365
Platform
  1. MacOS
Hi,

I have an array which is a dynamic calendar (B4:H9) (Let's call it 'Calendar Array"). I have another array(K4:Q9), which is also dynamic, but it only contains the dates that an employee is on leave (Let's call it 'Leave Array"). The Calendar Array is populated based on the inputs in C1 and E1, the Leave array is populated based on the inputs in L2:M2. I want to highlight these leave dates in the Calendar array. I could do this using duplicate values, but the Leave Array here is only for representation, in reality it would not be here and should only be used for the Conditional Formatting formula. I need help with creating such formula for Conditional Formatting that will highlight the dates in Calendar Array based on the inputs in L2:M2.

Any help will be really appreciated.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Book1
ABCDEFGHIJKLMNOPQR
1Year2022Month10FromTo
2Absent Dates08-10-202215-10-2022
3MONTUEWEDTHUFRISATSUN
42627282930010208091011121314
50304050607080915
610111213141516
717181920212223
824252627282930
931010203040506
10
11
12
Sheet1
Cell Formulas
RangeFormula
B4:H9B4=SEQUENCE(6,7,DATE(C1,E1,1)-WEEKDAY(DATE(C1,E1,1),2)+1,1)
K4:Q9K4=IF(SEQUENCE(6,7,L2,1)>M2,"",SEQUENCE(6,7,L2,1))
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B4:H9Expression=MONTH(B4)=$E$1textNO
B4:H9Expression=MONTH(B4)<>$E$1textNO
 
Upvote 0
How about using
Excel Formula:
=AND(B4>=$L$2,B4<=$M$2)
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,049
Messages
6,122,864
Members
449,097
Latest member
dbomb1414

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