LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default formulas for conditional formatting

I want Excel to background colour a cell, Red, Amber or Green using
conditional formatting 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

My data is numerical and with letters running:

1c,1b,1a,2c,2b,2a,3c,3b,3a,4c,4b,4a,5c,5b,5a,6c,6b ,6a
where 6a is highest and 1c is lowest

I have the formulas:

=AND(OR(LEFT(B2,1)LEFT(A2,1),AND(LEFT(B2,1)=LEFT (A2,1),RIGHT(B2,1)<RIGHT(A2,1))),B2<"",A2<"")

(For green)


=AND(OR(LEFT(B2,1)=LEFT(A2,1),AND(LEFT(B2,1)=LEFT( A2,1),RIGHT(B2,1)=RIGHT(A2,1))),B2<"",A2<"")

(for amber)

=AND(OR(LEFT(B2,1)<LEFT(A2,1),AND(LEFT(B2,1)<LEFT( A2,1),RIGHT(B2,1)IGHT(A2,1))),B2<"",A2<"")

( for red) the green and amber formulas work whatever data is entered, but
the red formula is only working if the number is different and isnt
recognizing that 1c is lower than 1b (for eg)

Please can anyone help??

 
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 formatting using formulas Murray[_2_] Excel Discussion (Misc queries) 2 June 4th 08 04:04 PM
Conditional Formatting-No Formulas IvanM Excel Worksheet Functions 16 March 10th 08 09:23 PM
Conditional formatting formulas Kobus Excel Discussion (Misc queries) 2 January 10th 07 02:28 PM
Conditional Formatting for Formulas Murat Gordeslioglu Excel Discussion (Misc queries) 3 June 22nd 06 09:03 AM
Help Using Formulas in Conditional Formatting Still Learning Excel Discussion (Misc queries) 2 January 28th 05 04:55 PM


All times are GMT +1. The time now is 08:57 AM.

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"