Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default If Formula or conditional formating


I am working on an employee attendance worksheet and I want that cells
change color upon cell contents, which in this case I have five conditions.
Unfrotunately in Excel 2003 there are only 3 conditions. My question is:

Can I use an IF formula to change the color of the cell according to
contents and what it is? Suppose that I want to use the letter "L" for Leave,
"P" for present, "S" for sick, "h" for holiday..etc.

Thank you for your help
--
Microsoft Biased
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default If Formula or conditional formating

You can use formulas in the conditional formatting tool. Go to
Format--Conditional formatting.

For condition 1 you want to select "formula is" and apply the appropriate
formula.

Ex: =IF(A1="L",[format red]) etc.

Dave

--
Brevity is the soul of wit.


"Nora Najem" wrote:


I am working on an employee attendance worksheet and I want that cells
change color upon cell contents, which in this case I have five conditions.
Unfrotunately in Excel 2003 there are only 3 conditions. My question is:

Can I use an IF formula to change the color of the cell according to
contents and what it is? Suppose that I want to use the letter "L" for Leave,
"P" for present, "S" for sick, "h" for holiday..etc.

Thank you for your help
--
Microsoft Biased

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default If Formula or conditional formating

Hi
The if statement function cannot change the colour of a cell. Functions only
give an answer. You could however create a macro to check the values of cells
and apply color to them

Sub change_cell()
For Each cell In Selection
If LCase(cell.Value) = "p" Then cell.Interior.Color = vbRed
'copy the above line for each of your cells and list them below
Next cell
End Sub

select the cells and run the macro!

there are quicker and more complex vba code you could use. Thisis a simple,
yet effective solution
--
Alwyas Trying
Eddie


"Nora Najem" wrote:


I am working on an employee attendance worksheet and I want that cells
change color upon cell contents, which in this case I have five conditions.
Unfrotunately in Excel 2003 there are only 3 conditions. My question is:

Can I use an IF formula to change the color of the cell according to
contents and what it is? Suppose that I want to use the letter "L" for Leave,
"P" for present, "S" for sick, "h" for holiday..etc.

Thank you for your help
--
Microsoft Biased

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formula to indicate Formula in cell SteveW New Users to Excel 9 August 2nd 06 01:12 AM
conditional formatting: problem entering EOMONTH formula... Jonathan Cooper Excel Discussion (Misc queries) 1 February 6th 06 09:28 PM
enhanced conditional formatting Stuart Excel Discussion (Misc queries) 13 November 13th 05 07:20 PM
Changing a Formula in Conditional Formatting Dee Excel Worksheet Functions 1 November 2nd 05 04:30 PM
VLOOKUP & Conditional Formating Help. Excel'ed Failures Excel Discussion (Misc queries) 6 August 16th 05 04:46 PM


All times are GMT +1. The time now is 08:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"