# Two conditions, one formula?

#### bpflyr

##### Board Regular
I know I'm close to a formula, but I just keep getting stuck. Here's what I'm trying to do in one formula:

IF J138 is blank (no data), then return E138
IF LEN(J138)>0, then return SUM(E138-J138)
Otherwise be blank.

Thank you!

### Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Try this

=IF(LEN(J138)>0, E138-J138, E138)

Thank you, that works, but I need to add...(this formula is going into cell K138)

IF the formula does do the calculation E138-J138, then K138, needs to be blank, otherwise, like you wrote, return E138.

Thanks.

Hi bpflyer:

Try ...

=IF(LEN(J138),E138-J138,"")

Replies
1
Views
426
Replies
9
Views
381
Replies
5
Views
258
Replies
9
Views
566
Replies
1
Views
179

1,203,750
Messages
6,057,146
Members
444,908
Latest member
Jayrey

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