# Excel1: Conditional Formula:

#### aacod

##### Well-known Member
I need a conditional formula in cell P3 such that:

1. if sum of cells K3:O3 - value in D3 = 0, format fonts to GREY

2. if sum of cells K3:O3 - value in D3 > 0, format fonts to GREEN

3. if sum of cells K3:O3 - value in D3 < 0, format fonts to RED

Thanks.

aacod

### Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
You would need three CFs since you want three colors, but you pretty much have it. They should look like:

=SUM(K3:O3)-D3=0

bbot,

I tried the same formula and I could not get the result, so I posted thinking that I may get help!

aacod

I used these three formulas and got the expected results:

=SUM(K3:O3)-D3<0
=SUM(K3:O3)-D3>0
=SUM(K3:O3)-D3=0

Is you worksheet calculation set to automatic or manual?

I have following formula in P3:
=IF(ISNUMBER(D3), (K3+L3+M3+N3+O3) - D3, "").

The figures in each cell from K3:O3 and manually entered.

aacod

Last edited:
I got it, created a new worksheet. Thanks.

I got it, created a new worksheet. Thanks.

You're welcome, glad you got it to work.

Replies
0
Views
106
Replies
8
Views
235
Replies
10
Views
157
Replies
1
Views
267
Replies
1
Views
164

Threads
1,203,313
Messages
6,054,696
Members
444,741
Latest member
MCB024

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

### Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

### Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back