Two conditions, one formula?

bpflyr

Board Regular
Joined
Nov 7, 2005
Messages
116
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!
 

Some videos you may like

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,061
Office Version
  1. 365
Platform
  1. Windows
Try this

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

bpflyr

Board Regular
Joined
Nov 7, 2005
Messages
116
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,796
Messages
5,574,361
Members
412,589
Latest member
ArtBOM
Top