Avatar of Bill Golden
Bill Golden
Flag for United States of America asked on

Compound IF Statement

I am at a loss how to do this.  I want to put the word Normalized in front of EBIT or EBITDA when cell K58 contains an X

=IF(C58="X"," "&AA112&"-YEAR EBIT AVERAGE FROM BELOW: "," "&AA112&"-YEAR EBITDA AVERAGE FROM BELOW: ")
Microsoft Excel

Avatar of undefined
Last Comment
Bill Golden

8/22/2022 - Mon
byundt

What is the logic of your formula except for adding the word Normalized? In other words, how do you know whether to use EBIT or EBITDA?

In the formula below, I use an IF to test cell K58 for "abc" to see whether it should be EBIT or EBITDA. This nonsensical test is a placeholder for the answer to my question. You need to replace that IF with the answer to my opening question.

That done, you then use the SUBSTITUTE function with another IF to replace EBIT with NORMALIZED EBIT if C58 equals "X".
=SUBSTITUTE(IF(K58="abc"," "&AA112&"-YEAR EBIT AVERAGE FROM BELOW: "," "&AA112&"-YEAR EBITDA AVERAGE FROM BELOW: "),"EBIT",IF(C58="X","NORMALIZED EBIT","EBIT"))
Qlemo

I don't think what you want is as simple as this:
=IF(C58="X"," "&AA112&"-YEAR Normalized EBIT AVERAGE FROM BELOW: "," "&AA112&"-YEAR Normalized EBITDA AVERAGE FROM BELOW: ")

Open in new window

I would rewrite that to have the common parts once only:
= " "&AA112&"-YEAR Normalized " & IF(C58="X","EBIT", "EBITDA") & " AVERAGE FROM BELOW: "

Open in new window

Bill Golden

ASKER
I apologize! I did a poor job of explaining what I need. IF C 58 contains an "X" the word EBIT is used, if not, the word EBITDA is used in its place.

In this case, EBIT can be Normalized or not and EBITDA  can be Normalized or not.

So, you have four (4) possible outcomes. Problem is I do not understand how to insert another IF statement inside an existing IF statement.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
byundt

In that case, your formula would be either of:
=" " & AA112 &"-YEAR " & IF(C58="X","NORMALIZED ","") & IF(K58="X","EBIT","EBITDA") &  " AVERAGE FROM BELOW: "

=CONCATENATE(" ",AA112,"-YEAR ",IF(C58="X","NORMALIZED ",""),IF(K58="X","EBIT","EBITDA"), " AVERAGE FROM BELOW: ")

Choose between the formulas according to whichever is easier for you to understand.
Bill Golden

ASKER
I'm sorry byundt, but neither formula works.  The first one does nothing when you put an X in C 58 or K58. The second one puts Normalized EBITDA when you put an X in C58, which is, of course, backwards. Nothing happen when you put an X in K58.
byundt

Are you saying that I had the tests for C58 and K58 backwards?
=" " & AA112 &"-YEAR " & IF(K58="X","NORMALIZED ","") & IF(C58="X","EBIT","EBITDA") &  " AVERAGE FROM BELOW: "

=CONCATENATE(" ",AA112,"-YEAR ",IF(K58="X","NORMALIZED ",""),IF(C58="X","EBIT","EBITDA"), " AVERAGE FROM BELOW: ")

Or were you saying that the formulas returned nothing at all?

In either event, I am posting a sample workbook.
CompoundIF_Q28931612.xlsx
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Bill Golden

ASKER
Hold the phone byundt. I am getting your formula to work.  I had to reverse C58 with K58 and change K58 to J59 which it should have been to start with.  My error!
ASKER CERTIFIED SOLUTION
byundt

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Bill Golden

ASKER
Yes, I had them reversed and K58 should have been J58 to start with.  I reversed the text and everything works fine.  Once I understood how to add another option "Other Method" I was able to do so.  Thank you for giving me an example I could learn from.  

I will study the CONCATENATE option to see if I can grasp the logic.
Bill Golden

ASKER
Perfect solution and advice on how to learn more in this area.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23