Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default IF statements and conditions

I don't even know if its IF statements I want!

I want Excel to background colour a cell, Red, Amber or Green dependent upon
the data in it compared to the data in the cell immediately left of it.

e.g. if the data is equal, or lower value = red
if the data is higher by 1 = amber
if the data is higher by 2+ = green

Can anybody help? it'll be much appreciated!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default IF statements and conditions

Have a look at Formats/Conditional formatting!

Regards,
Stefi


€˛Maliya9€¯ ezt Ć*rta:

I don't even know if its IF statements I want!

I want Excel to background colour a cell, Red, Amber or Green dependent upon
the data in it compared to the data in the cell immediately left of it.

e.g. if the data is equal, or lower value = red
if the data is higher by 1 = amber
if the data is higher by 2+ = green

Can anybody help? it'll be much appreciated!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default IF statements and conditions

Here's a play you can try out ..

Assuming the numbers to be conditionally formatted are in say, B2:B20
(to be compared with immediate left adjacent numbers in A2:A20)

Select B2:B20

Click Format Conditional Formatting

Under Condition 1:
Formula is: =AND(B2-A2<=0,B2<"",A2<"")
Format: Red fill

Under Condition 2:
Formula is: =AND(B2-A20,B2-A2<2,B2<"",A2<"")
Format: Amber fill

Under Condition 3:
Formula is: =AND(B2-A2=2,B2<"",A2<"")
Format: Green fill

Click to OK out.

Test it out ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Maliya9" wrote:
I don't even know if its IF statements I want!

I want Excel to background colour a cell, Red, Amber or Green dependent upon
the data in it compared to the data in the cell immediately left of it.

e.g. if the data is equal, or lower value = red
if the data is higher by 1 = amber
if the data is higher by 2+ = green

Can anybody help? it'll be much appreciated!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default IF statements and conditions

Hey Max, thanks for your help.

The formulas you gave ie

Formula is: =AND(B2-A2<=0,B2<"",A2<"")
Format: Red fill

worked fine. thank you.
Now my prob is my data is not all numerical, ie it runs
6a,6b,6c....to...1a,1b,1c where 6a is highest and 1c is lowest. So excel
cna't use formula where letters are involved. I can change the 1c, 1b etc
into average point scores instead. i.e 1c=7, 1b=9,1a=11 etc. But I wanted
Excel to do it so if a member of my staff types in 1c, the cell displays 7
adn if they type in 4a the cell will display 29 etc. I tried autocorrect, but
every cell needs every possibility...does this make sense? Really appreciate
your help. - Bob


"Max" wrote:

Here's a play you can try out ..

Assuming the numbers to be conditionally formatted are in say, B2:B20
(to be compared with immediate left adjacent numbers in A2:A20)

Select B2:B20

Click Format Conditional Formatting

Under Condition 1:
Formula is: =AND(B2-A2<=0,B2<"",A2<"")
Format: Red fill

Under Condition 2:
Formula is: =AND(B2-A20,B2-A2<2,B2<"",A2<"")
Format: Amber fill

Under Condition 3:
Formula is: =AND(B2-A2=2,B2<"",A2<"")
Format: Green fill

Click to OK out.

Test it out ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Maliya9" wrote:
I don't even know if its IF statements I want!

I want Excel to background colour a cell, Red, Amber or Green dependent upon
the data in it compared to the data in the cell immediately left of it.

e.g. if the data is equal, or lower value = red
if the data is higher by 1 = amber
if the data is higher by 2+ = green

Can anybody help? it'll be much appreciated!

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default IF statements and conditions

"Maliya9" wrote:
Hey Max, thanks for your help...


You're welcome

.. But I wanted Excel to do it
so if a member of my staff types in 1c,
the cell displays 7
and if they type in 4a the cell will display 29 etc...


Think you would need a sub to do the above. Suggest you try a fresh posting
in excel.programming to garner responses from those versed in vba.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---




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
nested if statements Jeremy Excel Worksheet Functions 2 September 14th 06 08:08 PM
IF and OR statements Loraloo Excel Discussion (Misc queries) 3 March 4th 06 11:42 PM
How to: Multiple "if" statements? Hosh New Users to Excel 2 June 29th 05 02:20 PM
Sum if statements with conditions La Donna Excel Worksheet Functions 2 June 20th 05 01:14 PM
more conditional format conditions rnc Excel Worksheet Functions 5 June 1st 05 11:58 AM


All times are GMT +1. The time now is 03:21 PM.

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

About Us

"It's about Microsoft Excel"