Error in formula

amlagu

New Member
Joined
Sep 11, 2014
Messages
15
I am trying this formula, but apparently have too many arguments, any suggestions?

=IF(L12="", H12, IF(N12<>"", H12-I12-M12, H12-I12, IF(P12<>"",H12-I12-M12-O12, H12-I12-M12)))

Thanks in advance
 

Some videos you may like

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Special-K99

Well-known Member
Joined
Nov 7, 2006
Messages
8,350
In words what are you trying to achieve?

It's going wrong....

=IF(L12="", H12, IF(N12<>"", H12-I12-M12, H12-I12, HERE IF(P12<>"",H12-I12-M12-O12, H12-I12-M12)))

An IF condition has TWO results true or false

H12-I12-M12,
Thats your TRUE result

H12-I12,
Thats your FALSE result

The rest of it
IF(P12<>"",H12-I12-M12-O12, H12-I12-M12)))
is the point where its going wrong
 
Last edited:

amlagu

New Member
Joined
Sep 11, 2014
Messages
15
I have a spreadsheet where if a date appears in one cell (L6) then I want to subtract I6 from H6, but if no date appears I want to just display H6 value in Q6. But if L6 and N6 have a value, but P6 doesn't then I want Q6 to equal H6-I6-M6. If L6 and N6 and P6 all have values I want Q6 to equal H6-I6-M6-O6.
I had previously posted and kindly received the following formula which works, but I wanted to add one more condition and can’t seem to work it out myself.
The formula I was given is:
=IF(L6="", H6, IF(N6<>"", H6-I6-M6, H6-I6))

Thanks in advance
 

Special-K99

Well-known Member
Joined
Nov 7, 2006
Messages
8,350
Try

in Q6
=IF(AND(L6<>"",N6<>"",P6<>""),H6-I6-M6-O6,IF(AND(L6<>"",N6<>"",P6=""),H6-I6-M6,IF(L6<>"",H6-I6,H6)))
 

Watch MrExcel Video

Forum statistics

Threads
1,112,816
Messages
5,542,660
Members
410,567
Latest member
SCraig123
Top