Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 I have the formulas: Formula is: =AND(B2-A2<=0,B2<"",A2<"") Format: Red fill ( and I have for Amber and green) Which work fine. 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 can't use that 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 and 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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=AND(OR(LEFT(B2,1)LEFT(A2,1),AND(LEFT(B2,1)=LEFT (A2,1),RIGHT(B2,1)<RIGHT(A2,1))),B2<"",A2<"")
will tell you if B2 is greater than A2. You should be able to adapt to equal and less than. -- Regards, Tom Ogilvy "Maliya9" wrote in message ... 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 I have the formulas: Formula is: =AND(B2-A2<=0,B2<"",A2<"") Format: Red fill ( and I have for Amber and green) Which work fine. 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 can't use that 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 and 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you, but it doesn't seem to be working. I put the formula into
conditional formatting so I could do the colours. the results were inconsistent. any ideas please? "Tom Ogilvy" wrote: =AND(OR(LEFT(B2,1)LEFT(A2,1),AND(LEFT(B2,1)=LEFT (A2,1),RIGHT(B2,1)<RIGHT(A2,1))),B2<"",A2<"") will tell you if B2 is greater than A2. You should be able to adapt to equal and less than. -- Regards, Tom Ogilvy "Maliya9" wrote in message ... 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 I have the formulas: Formula is: =AND(B2-A2<=0,B2<"",A2<"") Format: Red fill ( and I have for Amber and green) Which work fine. 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 can't use that 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 and 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can a cell display blank under certain conditions? | Excel Discussion (Misc queries) | |||
if conditions, and statements | Excel Discussion (Misc queries) | |||
if conditions in 2 cell correct then display third cell | New Users to Excel | |||
conditions in if statements | Excel Discussion (Misc queries) | |||
Sum if statements with conditions | Excel Worksheet Functions |