Conditional formatting on date ranges

excelnoob20

New Member
Joined
Nov 28, 2019
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi there,
I am currently trying to create a dynamic calendar in excel.

A disclaimer upfront: my username checks out. This is literally my second day working with excel formulas. I have done some VBA in Word before but that's it.

So my idea is to mark certain cells in my calendar in color green when a vacation is ongoing (see picture attached)

Here in Germany there are certain ranges of holidays, e.g. from Jan 01 until Jan 06. I would like to mark every value in between these two ones. I am aware on how conditional formatting works, but I am desperate enough with those date values now that I have created an account on this forum here.

What I have:
I have a table where I manually inserted the start and end dates of the holidays into and calculated the duration. (Structure below, date format "DD.MM.YYYY")
StartEnd#Days (End-Start+1)
01.01.202006.01.20206
06.04.202018.04.202013
...

Furthermore I have some conditional formatting ongoing for Saturdays and Sundays as well as other public holiday here (marked in yellow, see picture attached)

Now for the problem...
I have absolutely no idea how to create this without VBA. For this project specifically I am not allowed to use vba and I think it must be possible without it.. I have tried a little bit with VLOOKUP and MATCH but have not been successful at all.

Can anyone help out?
Thank you.
 

Attachments

  • jan20 holiday formatting.png
    jan20 holiday formatting.png
    13.9 KB · Views: 17

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Okay, so I found something out.

I have learned that VLOOKUP is not feasible for this use case, instead a combination of MATCH and INDEX will be used.

My new problem now is that I get a #N/A Error on this formula:

=INDEX(DATA!$L$3:$L$29;MATCH($B$4;DATEVALUE(DATA!$J$3:$J$29);0))

DATA!$L$3:$L$29 - This is the column with the duration (see table above)
$B$4 - This is the cell in my calendar where I get the date from (see picture attached) - in This case it is the row with "01 Mi ...." I fixed this value due to testing, I will update this post when I found a solution.
DATA!$J$3:$J$29 - This is where the start date stands (see table above)

The error occures when I try to match one date value against the array of data. How can I see if this specific date value is IN the array of data?
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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