Multiple IF, AND, OR help please...

aiki100

Board Regular
Joined
Aug 16, 2016
Messages
102
Hello All -

Thanks so much for any ideas you might have on this:

I am trying to combine the following statements, each of which seem to work fine on its own, into one statement. Have googled, have searched here - surely I am missing something fundamental.

Many thanks for suggestions!

=IF((AND(K3="L",AG3="")),"",AG3-AD3)
=IF((AND(K3="S",AG3="")),"",(AG3-AD3)*-1)
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Also,

If you use either, it doesn't matter what's in K, as AG needs to be blank for it to TRUE, and it won't calculate if it is?

Sorry, I must be missing something. Happy to help if you could perhaps explain a few scenarios and what you want the result to be.
 
Upvote 0
maybe this?

Code:
=IF(NOT(AG3=""),IF(NOT(K3="L"),AG3-AD3,IF(NOT(K3="S"),(AG3-AD3)*-1,"")),"")
 
Upvote 0
Thank you all very much. Your thoughts greatly appreciated!

As it turns out, fhqwgads has an answer that worked, (although I had to reverse the L and S to get the math on my side correct - the formula worked perfectly, fhqwgads, I just didn't describe it well -- so sorry, my fault).

- I had not thought of using NOT that way (because I didn't know...) so thank you VERY much for the instructive here.

final outcome was this:
=IF(NOT(AG3=""),IF(NOT(K3="S"),AG3-AD3,IF(NOT(K3="L"),(AG3-AD3)*-1,"")),"")

Thank again to all -

 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,262
Members
452,627
Latest member
KitkatToby

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