Checking if a certain day falls in a range

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear Excellent users.

I have a day [=TODAY()] in field AK1
In A1 I have the number of the week.
In fields A2 till E2 I have the five days of the week noted in MM-DD

Now I want to use conditional format for the number of the week. I want to
check if the day of AK1 falls in the range of A2 till E2. If such is the
case, I want the number of the week highlighted.

Can someone help me??

Thank you !!
 
Hi

With A1 selected, go to Format/Conditional Formatting use Formula Is and
then:
=COUNTIF($A$2:$E$2,AK1)>0

Andy.
 
Assuming the data in A2:E2 is dates fromatted as MM-DD then select A1 asn
use conditional formatting

Formula is =AND($A$2<=TODAY(),$E$2>=TODAY())

unless you need TODAY() in AK1 for something else, you can do away with it.
 
Hello Ian,

Thank you very much for your answer. It works for me. I do need the AK1
field for other comparisons, so I will compare to AK1, instead of TODAY() in
the conditional format.
--
** Fool on the hill **


Ian said:
Assuming the data in A2:E2 is dates fromatted as MM-DD then select A1 asn
use conditional formatting

Formula is =AND($A$2<=TODAY(),$E$2>=TODAY())

unless you need TODAY() in AK1 for something else, you can do away with it.

--
Ian
--
Jaydubs said:
Dear Excellent users.

I have a day [=TODAY()] in field AK1
In A1 I have the number of the week.
In fields A2 till E2 I have the five days of the week noted in MM-DD

Now I want to use conditional format for the number of the week. I want to
check if the day of AK1 falls in the range of A2 till E2. If such is the
case, I want the number of the week highlighted.

Can someone help me??

Thank you !!
 
Glad it works for you and thanks for the feedback.

--
Ian
--
Jaydubs said:
Hello Ian,

Thank you very much for your answer. It works for me. I do need the AK1
field for other comparisons, so I will compare to AK1, instead of TODAY()
in
the conditional format.
--
** Fool on the hill **


Ian said:
Assuming the data in A2:E2 is dates fromatted as MM-DD then select A1 asn
use conditional formatting

Formula is =AND($A$2<=TODAY(),$E$2>=TODAY())

unless you need TODAY() in AK1 for something else, you can do away with
it.

--
Ian
--
Jaydubs said:
Dear Excellent users.

I have a day [=TODAY()] in field AK1
In A1 I have the number of the week.
In fields A2 till E2 I have the five days of the week noted in MM-DD

Now I want to use conditional format for the number of the week. I want
to
check if the day of AK1 falls in the range of A2 till E2. If such is
the
case, I want the number of the week highlighted.

Can someone help me??

Thank you !!
 
That's the good (and frustrating) thing about Excel. For any given problem
there is normally more than one solution.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top