ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Custom format (https://www.excelbanter.com/excel-discussion-misc-queries/134274-custom-format.html)

m.sparks

Custom format
 
I have 2 rows of numbers: 2, 3, 5, 4
and 4, 3, 4, 5
I want to format the numbers in second row to display in red, if it is
greater than the number in the first row (in same column), in blue, if it
less than, and in black if otherwise.
Please help. Thanks in advance.

joel

Custom format
 
Use conditional formating. click on the 1st 4 in the 2nd row. In the Fomat
Menu select conditional formating

this assumes the data is in rows 1 & 2.

enter in condition 1
=IF(A1A2,TRUE,FALSE)
select format and in Pattern select red
Press OK

Select Add
enter condition 2
=IF(A1<A2,TRUE,FALSE)
select format and in Pattern select blue
Press OK

Select Add
enter condition 3
=IF(A1=A2,TRUE,FALSE)
select format and in Pattern select black
Press OK

Now you have to copy the conditional format. with the 1st 4 on row 2
highlighted select the paint brush on the tool bar. Now highlight columns 2
- 4. The conditional formating should be on all cells on row 2 columns 2 - 4.
"m.sparks" wrote:

I have 2 rows of numbers: 2, 3, 5, 4
and 4, 3, 4, 5
I want to format the numbers in second row to display in red, if it is
greater than the number in the first row (in same column), in blue, if it
less than, and in black if otherwise.
Please help. Thanks in advance.


David Biddulph[_2_]

Custom format
 
You can do it simpler than that.

If you are using "Formula is", you don't need the =IF(...,TRUE,FALSE)
construct; all you need is =A2A1

Another option is "Cell Value is" "greater than" =A1

And you don't need to go through the format paint routine at the end if you
select cells A2-D2 in the beginning and have cell A2 as the active cell
while you set up the conditional formatting.
--
David Biddulph

"Joel" wrote in message
...
Use conditional formating. click on the 1st 4 in the 2nd row. In the
Fomat
Menu select conditional formating

this assumes the data is in rows 1 & 2.

enter in condition 1
=IF(A1A2,TRUE,FALSE)
select format and in Pattern select red
Press OK

Select Add
enter condition 2
=IF(A1<A2,TRUE,FALSE)
select format and in Pattern select blue
Press OK

Select Add
enter condition 3
=IF(A1=A2,TRUE,FALSE)
select format and in Pattern select black
Press OK

Now you have to copy the conditional format. with the 1st 4 on row 2
highlighted select the paint brush on the tool bar. Now highlight columns
2
- 4. The conditional formating should be on all cells on row 2 columns
2 - 4.


"m.sparks" wrote:

I have 2 rows of numbers: 2, 3, 5, 4
and 4, 3, 4, 5
I want to format the numbers in second row to display in red, if it is
greater than the number in the first row (in same column), in blue, if it
less than, and in black if otherwise.
Please help. Thanks in advance.





All times are GMT +1. The time now is 12:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com