VB code

  • Thread starter Thread starter @Homeonthecouch
  • Start date Start date
@

@Homeonthecouch

Hello,
I have sheet that I am wanting to enter Monday to Friday in cells manually.
I want the Interior.ColorIndex to be ruled by the actual day that it currently is.
I want to regulate that by today=() and format the value as dddd to give me the day.

How do I write the code to tell it that I only want the Interior.ColorIndex to report the actual day?

Hope that makes sense,

Any help is appreciated.


Andrew
 
Use conditional formatting.

Select the cells, say B2:F2, and then Format>Conditional Formatting.

Set Condition 1 set to Formula Is, and a formula of =B2=TODAY(), and set a
pattern colour.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Lets say in cell B1 I want to enter Monday
B1 Monday
B2 Tuesday
B5 Wednesday
B7 Thursday
B8 Friday

These will be input manually and can differ.

I want to make the cell colour change according to the actual day.
I have a VB script that controls the cells according to what is input
e.g..
Case Is = "PT", "pt": .Interior.ColorIndex = 15

Hope that explains it a little better?

Andrew



A bit more detail would be helpful
 
Conditional formatting as I said with a formula of

=B2=TEXT(TODAY(),"dddd")

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Oooohhh clever !!!
I like that Bob.

Thank you very much.

Andrew


Conditional formatting as I said with a formula of

=B2=TEXT(TODAY(),"dddd")

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Back
Top