Four answers in one formula?

bpflyr

Board Regular
Joined
Nov 7, 2005
Messages
116
Sorry, I just posted a question very similar to this, but I had not thought it all the way through. Here's what I'm trying to do in one formula:

IF LEN(J138)=0, then return F138
IF LEN(J138)>0, then SUM(E138-J138). IF that result is 0, then be blank.
IF LEN(F138)=0, then be blank

Thank you!!
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Sounds like your last criteria is actually your first.

You almost wrote out verbatim what the formula would look like.

=if(len(f138)=0,"",if(len(J138)=0,F138,if(len(J138)>0,sum(E138:J138),"")))

the basic construct of IF in Excel is:

IF(condition, true-result, false-result)

You can "nest" up to 6 or 7 different IF statement. (Forget the actual number).
 
Upvote 0
bpflyr

Could you try and stick to 1 thread?

I know this one is slighty different but they are related.
 
Upvote 0
Hi bpflyr:

It is not a good idea to start another thread on the same type of question. Anyway, how about ...

=IF(F138=0,"",IF(LEN(J138)=0,F138,IF(E138-J138,E138-J138,"")))
 
Upvote 0
bpflyr said:
Sorry, I just posted a question very similar to this, but I had not thought it all the way through. Here's what I'm trying to do in one formula:

IF LEN(J138)=0, then return F138
IF LEN(J138)>0, then SUM(E138-J138). IF that result is 0, then be blank.
IF LEN(F138)=0, then be blank

Thank you!!

=IF(J138="",IF(F138="","",F138),IF(E138-J138,E138-J138,""))
 
Upvote 0

Forum statistics

Threads
1,213,557
Messages
6,114,293
Members
448,564
Latest member
ED38

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