SOLVED

Nested IF

Copper Contributor

 

Hi good folks, I have an issue with this nested IF in B8.  Some of the formula works but I cannot get it all to function as intended and maybe someone who knows their way around better the I do can help me out.

 

B8=IF(B4,IF(B5,B4*B5,IF(B5,B3*B5,IF(B4,B4,B3))))

First and second IF tests if both overrides are present and calculates if that is the case and terminates. This works.

Third IF tests if just the Quantity Override is present and should calculate Quantity Override x Standard Unit Price. Doesn't work. Results - "FALSE"

Fourth IF tests if just the Price Override is present and retun value. This works if there is a value present.

Fourth IF test result for "value if false" returns "FALSE" and not Standard Unit Price in B3 as expected.

when broken into its component parts the formula works but I cannot get it to work when assembled. I one cell available and cannot use VBA as its for ios.

 

A1B1
ProductPrinter Cartridge
Standard Unit Price35.00
Price Override 
Quantity Override2
  
  
TotalFALSE

 

Thanks, in anticipation, Richard

2 Replies
best response confirmed by rjhwuk (Copper Contributor)
Solution

@rjhwuk 

=IF(AND(B5<>"",B4<>""),B5*B4,IF(AND(B5<>"",B4=""),B5*B3,IF(AND(B5="",B4<>""),B4,B3)))

Maybe with this formula which seems to work in my sheet. 

Wow, that was fast and it works great! Thank you, your help is very much appreciated, Richard
1 best response

Accepted Solutions
best response confirmed by rjhwuk (Copper Contributor)
Solution

@rjhwuk 

=IF(AND(B5<>"",B4<>""),B5*B4,IF(AND(B5<>"",B4=""),B5*B3,IF(AND(B5="",B4<>""),B4,B3)))

Maybe with this formula which seems to work in my sheet. 

View solution in original post