Working with between dates but exclude certain dates

oblix

Board Regular
Joined
Mar 29, 2017
Messages
183
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
  5. 2013
  6. 2011
  7. 2010
  8. 2007
  9. 2003 or older
Platform
  1. Windows
  2. MacOS
  3. Mobile
  4. Web
Hi there all
I have a spread sheet that marks a 1 below everydays date based on a from and to date.
From row six there is an "date in" column M and "date out" in column N. in column O I have "Temp out from and in column P I Have tempory out to date. From columns R to RV I have the days of the month.
My goal is to populate a 1 under every date if it is within the in and out criterea.
I have suchessfully achieved this with the following formula: for day 1 it was : "=($M6<=$R$4)*($N6+1>$R$4)" where R4 is the date of the day. (eg 1st) for date in and date out
However I dont want to mark days as 1 if it is between the "temp out from" and "temp out to dates" (column o and p)/ in other words exclude these days. pls help
Thank you
 
Last edited:

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Sample
 

Attachments

  • Screenshot 2022-10-15 153144.png
    Screenshot 2022-10-15 153144.png
    31.7 KB · Views: 11
Upvote 0
solved it by changing
=($M6<=$R$4)*($N6+1>$R$4) to =($M6<=$R$4)*($N6+1>$R$4)-($O6<=$R$4)*($P6+1>$R$4)
 
Upvote 0
Solution

Forum statistics

Threads
1,214,914
Messages
6,122,211
Members
449,074
Latest member
cancansova

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