# Double IF needed

#### Lawbut

##### New Member
Beginner, question #2

IF C4 >= D4+E4, then Subtract D4+E4 from C4
IF C4 < D4+E4, then do nothing

Can this be written in one formula?

Thanks

### Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

#### VoG

##### Legend
Maybe

IF(C4>= D4+E4,C4-(D4+E4),"")

#### Lawbut

##### New Member
Didn't work - thanks for the attempt

#### Snakehips

##### Well-known Member
Lawbut,

Yes.

The way you have written your logic above is prettmuch as you will need to create an Excel IF statement.

IF(Test Condition ,This if test = true, Otherwise this if test = false)

Look at the If statement answer I gave you earlier and you should be able to work it out for yourself.
Give it a try.

Come back if you struggle.

#### Lawbut

##### New Member
Will do Snakehips - thanks

#### Lawbut

##### New Member
IF(C4>= D4+E4,C4-(D4+E4),"")

Worked Great - I didn't add the =IF

Newbie's!

#### Snakehips

##### Well-known Member
Well done!

We all start knowing nothing but hopefully we learn a bit as we go along.
Rest assured, Newbie or Oldbie we all make silly mistakes.
Enjoy Excel.

#### Lawbut

##### New Member
Also need to add If C4 is less than C5 then value is zero<c5, then="" value="" is="" 0<="" html=""></c5,>

Last edited:

#### Lawbut

##### New Member
also need to add if C4<C5 then value is 0

#### VoG

##### Legend
Try

=IF(C4< C5,0,IF(C4>= D4+E4,C4-(D4+E4),""))

Replies
3
Views
81
Replies
17
Views
571
Replies
7
Views
329
Replies
5
Views
170
Replies
2
Views
209

1,191,695
Messages
5,988,147
Members
440,130
Latest member
bianca88

### 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.

### Which adblocker are you using?

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

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