Conditional Formatting

Kanty

New Member
Joined
Jan 15, 2009
Messages
4
Hello!
I have two columns. Lets say column A and column B.
In column B I have positive, negative and nul prices.
If cell B1 has a positive price, I want cell A1 to have green colour.
If cell B1 has a negative price, I want cell A1 to have red colour.
If cell B1 has a zero price, I want cell A1 to have yellow colour.
And I want to do this for all the cells of A column.
Can it be done automatically or I have to do it one by one?

Thank you in advance!
 

Some videos you may like

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Kanty

New Member
Joined
Jan 15, 2009
Messages
4
Ohhh!Please I need a answer ASAP cause it is for a project...and I have a deadline for tommorrow!Thank you very much!
 

Weaver

Well-known Member
Joined
Sep 10, 2008
Messages
5,196
does the data start on row 1? This is important

If it does then

1. select all the cells in column A as far down as the data in Column B goes
2. colour them all red
3. select conditional formatting
4. for condition 1, select 'formula is' and type =B1=0
5. set the format to pattern = yellow
6. for condition 2, select formula is and type =B1>0
7. set the format for green
8. note if your data/selection starts on any row other than 1, change the formulas accordingly
9. start earlier next time!
 

Kanty

New Member
Joined
Jan 15, 2009
Messages
4
1)Thank for the quick response!
2)I promise I ll be a good girl if I ll finish this one in time!
3)My data starts on row 2.
4)Do I have to do it one by one???

I tried to do the same....like =B2=0 but it doesnt work....
is there a formula to do it all at once???
like for every negative price of the column B the price of the column A has to take red colour????but for all the cells???
 

Weaver

Well-known Member
Joined
Sep 10, 2008
Messages
5,196
The idea was to set them all to red, then the conditional formatting only has to have 2 conditions, one for +ve and one for zero, since all cells are going to be coloured in.

Did you select all the cells in A, from A2 down before you started?
 

Kanty

New Member
Joined
Jan 15, 2009
Messages
4
Ok!
Due to you I ll be a good girl from now and on!
Thank you sooo much!
 

Watch MrExcel Video

Forum statistics

Threads
1,102,042
Messages
5,484,348
Members
407,437
Latest member
alfaroM

This Week's Hot Topics

  • Finding issue in If elseif else with For each Loop
    Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
  • MsgBox Error
    Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
  • CELL FORMAT - IF CONDITION
    My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
  • Show numbers nearly the same
    Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...
  • Please i need your help to create formula
    I need a formula in cell B8 to do this >>if b1=1 then multiply ( cell b8) by 10% ,if b1=2 multiply by 20%,if=3 multiply by 30%. Thank you in...
  • Got error while adding column and filter
    Got error while adding column and filter In column Z has some like "Success" and "Error". I want to add column in AA if the Z cell value is...
Top