Computing.Net > Forums > Office Software > colors in excel vba

colors in excel vba

Reply to Message Icon

Original Message
Name: mherber2
Date: October 3, 2007 at 18:00:01 Pacific
Subject: colors in excel vba
OS: xp pro
CPU/Ram: unknown
Model/Manufacturer: unknown
Comment:

ok... once again i need some help...darn vba got me again...this time what i am looking for is i track certian stats at work such as how long each employee spends on each call and they have a certian goal to get the customer off the phone, well what im looking to do is in excel, when i type in their're stats if its over a certian number i want to the font in that cell to turn red...if anyone knows of a way that i can do this please help


Report Offensive Message For Removal


Response Number 1
Name: Bryco
Date: October 4, 2007 at 03:29:53 Pacific
Subject: colors in excel vba
Reply: (edit)

Select your cell or column and then
Go to Format, Conditional Formatting.

Set your condition to "Greater than or equal to",click on the Format button and select a color from the 'Color' drop down box for that condition.

Bryan


Report Offensive Follow Up For Removal

Response Number 2
Name: DerbyDad03
Date: October 4, 2007 at 06:40:39 Pacific
Subject: colors in excel vba
Reply: (edit)

Bryco's answer sounds like the perfect solution but I'm just curious about something.

You used "vba" in your subject and "darned vba" in your post. Are you looking to do this with VBA or does Conditional Formatting fit the bill?


Report Offensive Follow Up For Removal

Response Number 3
Name: mherber2
Date: October 7, 2007 at 12:17:47 Pacific
Subject: colors in excel vba
Reply: (edit)

ok that worked but i got another problem now lol. not im working on a bullitin board for our employees using excel, what a want to do is make it so that if there is a certian word i a cell it will clear the cell, basicly a censor to ensure that there is no profane language... any ideas?


Report Offensive Follow Up For Removal

Response Number 4
Name: DerbyDad03
Date: October 8, 2007 at 07:08:32 Pacific
Subject: colors in excel vba
Reply: (edit)

My first thought relates to how many profane words there are and how could you possibly check for every one, including variations (e.g. d*mn, sh!t, etc.). Not sure that that can easily be done.

Actually, my first thought was "Why would anyone use Excel for a bulletin board?" but that's a whole 'nother discussion.

My second (third?) thought was "Hmm, this question has nothing to do with "colors in excel vba".

Anyway, if you right-click on a sheet tab, chose View Code and paste this in, it should prevent any entry that contains dog, cat or bird, including Dog, CAT, or My BiRd iS Loud, etc.

Private Sub Worksheet_Change(ByVal Target As Range)
If _
UCase(Target) Like UCase(("*dog*")) Or _
UCase(Target) Like UCase(("*cat*")) Or _
UCase(Target) Like UCase(("*bird*")) _
Then Target = ""
End Sub



Report Offensive Follow Up For Removal

Response Number 5
Name: mherber2
Date: October 9, 2007 at 06:09:56 Pacific
Subject: colors in excel vba
Reply: (edit)

thank you every one for you help


Report Offensive Follow Up For Removal


Response Number 6
Name: mherber2
Date: October 9, 2007 at 06:22:45 Pacific
Subject: colors in excel vba
Reply: (edit)

ok just one more thing, same project, when it is saved using ctrl+s i want it co close excel


Report Offensive Follow Up For Removal

Response Number 7
Name: mherber2
Date: October 9, 2007 at 06:40:46 Pacific
Subject: colors in excel vba
Reply: (edit)

Also when this excel workbook is open i don't want and toolbars open, including the formula bar. how can i do this along with the ctrl+s thing


Report Offensive Follow Up For Removal

Response Number 8
Name: mherber2
Date: October 9, 2007 at 14:48:26 Pacific
Subject: colors in excel vba
Reply: (edit)

ok i did get the ctrl+s now i only need help with the forula bar...please assist


Report Offensive Follow Up For Removal

Response Number 9
Name: DerbyDad03
Date: October 9, 2007 at 15:28:36 Pacific
Subject: colors in excel vba
Reply: (edit)

Please re-ask your toolbar question under a relevant subject line.

Thousands of toolbar experts want to help you but don't even know that you asked the question because they aren't following the "colors in excel vba" thread.



Report Offensive Follow Up For Removal






Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: colors in excel vba

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




How often do you use Computing.Net?

Every Day
Once a Week
Once a Month
This Is My First Time!


View Results

Poll Finishes In 3 Days.
Discuss in The Lounge