Simple IF Statement

EvansB2

Board Regular
Joined
Nov 25, 2008
Messages
245
Office Version
  1. 365
Platform
  1. Windows
Hi there,

In cell C2 (green) I have the following basic formula =IF(C2<B2,C2,B2). I would like to add another argument that if no entry is put in cell B2, then cell A2 is returned instead of "0".

Any assistance would be greatly recieved.

Regards

Ben

ABCD
1Residual lifeResidual Life OverrideConfirmed residual life
2533
3
4
<colgroup><col width="29" style="width: 22pt; mso-width-source: userset; mso-width-alt: 1060;"> <col width="64" style="width: 48pt; mso-width-source: userset; mso-width-alt: 2340;" span="2"> <col width="85" style="width: 64pt; mso-width-source: userset; mso-width-alt: 3108;"> <col width="78" style="width: 59pt; mso-width-source: userset; mso-width-alt: 2852;"> <tbody> </tbody>
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Your formula cut off. Probably because of greater than or less than symbols...try using PHP tags to post your formula again. Also, explain a little more what you want to happen in C2.

BTW, if the formula is in C2, and the beginning of the formula is:

=IF(C2

that's going to be circular, and is likely to cause you problems.
 
Upvote 0
Thank you. Not sure why my browser didn't show all that.

The problem remains though...if you put that formula in cell C2, you're going to have problems.
 
Upvote 0
Thank you. Not sure why my browser didn't show all that.

Mine doesn't either, but if you reply with quote, then click "Switch Editor to Source Mode" (the A/A button on the left of the tool bar), you can usually see the formulas when they get cut off like that.
 
Last edited:
Upvote 0
Hi there,

In cell C2 (green) I have the following basic formula =IF(C2<b2,c2,b2). i="" would="" like="" to="" add="" another="" argument="" that="" if="" no="" entry="" is="" put="" in="" cell="" b2,="" then="" a2="" returned="" instead="" of="" "0".

Any assistance would be greatly recieved.

Regards

Ben

ABCD
1Residual lifeResidual Life OverrideConfirmed residual life
2533
3
4

<tbody>
</tbody>


</b2,c2,b2).>

Now we're getting somewhere, I think. In any cell other than A2, B2 or C2, that would be something like this:

PHP:
=IF(B2="",A2,IF(C2<b2,c2,b2)

EDIT: Now I did it, lol. Sorry...complete formula should show now.<b2,c2,b2)<b2,c2,b2))< html=""></b2,c2,b2)<b2,c2,b2))<>
 
Last edited:
Upvote 0
Try:
Code:
=IF(LEN(B2),MIN(B2,C2),A2)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,564
Messages
6,125,581
Members
449,237
Latest member
Chase S

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

Which adblocker are you using?

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
Back
Top