Multiple complex If statements

jlyn123

New Member
Joined
Jan 24, 2018
Messages
48
Office Version
  1. 2016
Hello - I am not sure how I can add the below if statement into what I already have below. Any ideas?

=IF(AND(H9="USD",E9="USD"),"No FX Trade Needed",IF(OR(H9="",E9=""),"",IF(H9=E9,"BUY","SELL"))))

What I want to add is IF cell A1 and B1 start with "US" then cell H1 needs to be USD, "flag for exception". Or if cell H1 doesnt equal USD, "flag for deletion"?

Thanks!
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
What I want to add is IF cell A1 and B1 start with "US" then cell H1 needs to be USD, "flag for exception". Or if cell H1 doesnt equal USD, "flag for deletion"?

You need to clarify this.... doesnt make sense

if cell A1 and B1 start with "US" then cell H1 needs to be USD ? Formulas cannot change the values of other cells

 
Upvote 0
Hi,

I think may be OP means something like this:


Book1
ABCHIJ
1USDAUSDBHGKYENFlag for Deletion
Sheet122
Cell Formulas
RangeFormula
J1=IF(AND(COUNTIF(A1,"US*"),COUNTIF(B1,"US*")),IF(H1="USD","Flag for Exception","Flag for Deletion"),"Insert your original formula here")
 
Upvote 0
Thank you Jtakw - this is exactly what I was looking for and is working perfectly.
 
Upvote 0
You're welcome, glad it works for you.
 
Upvote 0
Ok, I have another question regarding IF/Vlookup formulas.

I want to write a formula that looks up a value based on the value in a certain cell.

Below is what I have started with but I cant get it to work out. If cell E9 equals "USD" then I want to look at a value based on the vlookup instructions to product another value (this value will change depending on the A & B combinations. If cell E9 isnt USD then I want to look up the value another way and again this will change depending on B & E combinations...is that possible?
=IF(E9="USD",VLOOKUP(A9&B9,Details!A:I,9,FALSE)) or IF(E9<>"USD",VLOOKUP(B9&E9,Details!G:I,3,FALSE))

Any help would be greatly appreciated.

Thanks!!!
 
Upvote 0
Ok, I have another question regarding IF/Vlookup formulas.
New questions should be posted to new threads. Only follow-up questions on your original question should be posted to the original thread.
 
Upvote 0
Hi,

I'll sneak this in...

Don't know any of your actual data so I'm not sure what you need, all I can do is help you combine your sample formulas:

=IF(E9="USD",VLOOKUP(A9&B9,Details!A:I,9,FALSE),VLOOKUP(B9&E9,Details!G:I,3,FALSE))
 
Upvote 0
Thank you Jtakw for sneaking your response here - again, this is exactly what I was looking for to get my formula to work how I wanted. Thanks again!!!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,184
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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