More fun with two dates entered in a single cell. (conditional format issues)

blbat

Active Member
Joined
Mar 24, 2010
Messages
338
Office Version
  1. 2016
  2. 2013
I have a spreadsheet with two dates entered into a single cell separated by a "-" as follows:

11/17/2022-05/11/2023

I have tried multiple times to figure out a way to highlight the cell if TODAY() is within the two dates range:
Code:
=AND(WEEKNUM(LEFT($O2,LEN($O2)-FIND("-",$O2)))*1>=TODAY(),WEEKNUM(RIGHT($O2,LEN($O2)-FIND("-",$O2)))*1<=TODAY())

I can use the LEFT or RIGHT to conditional format, but somehow I can't get the 'between' to work.

I know I must be missing something simple, but I'm not seeing it.

any help would be appreciated.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Try changing AND to OR.

or Try

Book3
NOPQR
1
211/22/2022-11/23/2022TRUEFALSE
3
4
5
Sheet6
Cell Formulas
RangeFormula
P2P2=OR(LEFT(O2,SEARCH("-",O2)-1)+0>=TODAY(),MID(O2,SEARCH("-",O2)+1,99)+0<=TODAY())
Q2Q2=AND(WEEKNUM(LEFT($O2,LEN($O2)-FIND("-",$O2)))*1>=TODAY(),WEEKNUM(RIGHT($O2,LEN($O2)-FIND("-",$O2)))*1<=TODAY())
 
Last edited:
Upvote 0
Ignor that and Try

Book3
NOP
1
211/22/2022-11/24/2022TRUE
3
4
Sheet6
Cell Formulas
RangeFormula
P2P2=AND(LEFT(O2,SEARCH("-",O2)-1)+0<=TODAY(),MID(O2,SEARCH("-",O2)+1,99)+0>=TODAY())
 
Upvote 0
Solution

Forum statistics

Threads
1,213,534
Messages
6,114,185
Members
448,554
Latest member
Gleisner2

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