VB code - @Homeonthecouch

29-Jan-08 11:19:42
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
reply
 
 

VB code - Don Guillett

29-Jan-08 11:42:41
A bit more detail would be helpful

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1@austin.rr.com
reply
 

VB code - Bob Phillips

29-Jan-08 11:46:54
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)
reply
 

VB code - @Homeonthecouch

29-Jan-08 01:15:11
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

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1@austin.rr.com
reply
 

VB code - Bob Phillips

30-Jan-08 05:55:04
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)
reply
 

VB code - @Homeonthecouch

30-Jan-08 03:10:58
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)
reply
 
Number of different cell formats
promotion
Silverlight    WPF    WCF    WWF    LINQ   
JavaScript    AJAX    ASP.NET    XAML   
C#    VB.NET    VB 6.0    GDI+    IIS    XML   
.NET Generics    Anonymous Methods    Delegate   
Visual Studio .NET    Expression Blend    Virus   
Windows Vista    Windows XP    Windows Update   
Windows 2003 Server    Windows 2008 Server   
SQL Server    Microsoft Excel    Microsoft Word   
SharePoint    BizTalk    Virtual Earth   
.NET Compact Framework    Web Service   

"Everything" RSS / ATOM Feed Parser
How to send and receive messages through message queuing in .Net
How to Read text file as database
SQL Server 2005 Paging Performance Tip
Display code of web page.
Fully Scalable Excel File Importer class for .net using Microsoft Jet driver
Generic Chart Color Manager class that can be used for any charts
Helper class to style the infragistics wingrid
Using Reflection to detemine as Assembly Info in and out.
Helper class to play with Window (Owners and position)
Resolving displayname from the culture using the XmlLanguage and LanguageSpecificStringDictionary class