SOLVED

Month is true, when it it between a date range.

Steel Contributor

Hi,

 

I want the Month to be true. If one or more dates in a date range is in that month.

 

Please see excample file for details.

 

Best Regards

- Geir

4 Replies
best response confirmed by Geir Hogstad (Steel Contributor)
Solution

@Geir Hogstad 

In G8:

 

=IF(AND($E8<=G$4,$F8>=G$3),"T","F")

 

Fill to the right, then down or vice versa.

@Geir Hogstad 

An Excel 365 formula that I like is

= LET(
  latestStart, IF(Start>monthBegin, Start, monthBegin),
  earliestEnd, IF(End<monthEnd, End, monthEnd),
  overlap, 1 + earliestEnd - latestStart,
  IF(overlap>0, overlap, "") )

placed in a single cell and allowed to spill.  The final line can be modified to give "T" and "F" if preferred.

@Geir Hogstad 

For the possible benefit of Excel 365 users, the following shows a spreadsheet in which the display is controlled by a check box and conditional formatting.

image.pngimage.png

Thank you, it worked perfect.

- Geir
1 best response

Accepted Solutions
best response confirmed by Geir Hogstad (Steel Contributor)
Solution

@Geir Hogstad 

In G8:

 

=IF(AND($E8<=G$4,$F8>=G$3),"T","F")

 

Fill to the right, then down or vice versa.

View solution in original post