# If < 0 Then

#### vessii80

##### New Member
Hi everyone,
I need help from you.
I have following:

B3 5
B4 23

and below

B10 20

I want to write a formula in C 3 saying:
If (B5-B10)>0 the real result ,If (B5-B10)=<0 then showing 0, and in C 4 showing the result of B4 minus the rest.
So in this example we have:
1. B5-B10=-15, so in C3 we must have 0 and in C 4=8, B4-(-(B5-B10))

Iva

### Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

#### Richard Schollar

##### MrExcel MVP
Hi & Welcome to the Board

For the first part (I didn't understand what you were asking for the second) you could use:

=MAX(0,B5-B10)

#### vessii80

##### New Member
Hi,
And thank you for the reply.

I'll try to explain:

If the result If (B5-B10)>0 in C 3 to be shown the positive result, if it's negative to show zero

regards,

Iva

#### Richard Schollar

##### MrExcel MVP
Yes, that is handled by the formula I have already given you. it was the what you wanted next I didn't understand.

#### vessii80

##### New Member
The next part is:

If the result is negative to take the value from B4 and and extract the negative result from it, showing it in C 4

#### Richard Schollar

##### MrExcel MVP
Perhaps:

=IF(B5-B10<0,B4+B5-B10,"")

in C4.

Replies
5
Views
51
Replies
8
Views
110
Replies
1
Views
93
Replies
3
Views
223
Replies
2
Views
543

### Forum statistics

1,129,685
Messages
5,637,809
Members
416,983
Latest member
LessThanAverageUser

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