0

Here is my statement with just one IF Statement:

=IF(AF2="Consultant",IF(C2=INDEX(JIRA!F:F,MATCH('RFO Checks'!M2,JIRA!A:A,0)),1,0),"N/A")

This works great, but now I need to add two more IF Statements.

AF2 will either contain "Consultant", "Retailer", or "PC".

Each one will be directed to a different price column:

  • for "Consultant" it's JIRA!F:F
  • for "Retailer" it's JIRA!D:D
  • for "PC", it's JIRA!E:E.

I've been wracking my brain for two days now and haven't gotten no where.

Suggestions?

Thank you in advance!

1
  • Thank you GalAbra for your help.. it worked. Commented Feb 14, 2018 at 0:06

2 Answers 2

1

Use CHOOSE()

=IFERROR(--(C2=INDEX(CHOOSE(MATCH(AF2,{"Consultant", "Retailer", "PC"},0),JIRA!F:F,JIRA!D:D,JIRA!E:E),MATCH('RFO Checks'!M2,JIRA!A:A,0))),"N/A")
Sign up to request clarification or add additional context in comments.

Comments

1

Aaron,

I have provided you the high level structure for the change of logic.

If this is what you want, then you can substitute the phrases with the appropriate logic.

=IF(AF2="Consultant",
    IF(C2=INDEX(JIRA!F:F,MATCH('RFO Checks'!M2,JIRA!A:A,0)),1,0),
    IF(AF2="Retailer",
        <insert_logic_for_retailer>,
        IF(AF2="PC",<insert_logic_for_PC>,"N/A")
      )
   )

Logic for Consultant -

    IF(C2=INDEX(JIRA!F:F,MATCH('RFO Checks'!M2,JIRA!A:A,0)),1,0)

Logic for Retailer, use this to replace -

    IF(C2=INDEX(JIRA!D:D,MATCH('RFO Checks'!M2,JIRA!A:A,0)),1,0)

Logic for PC, use this to replace -

    IF(C2=INDEX(JIRA!E:E,MATCH('RFO Checks'!M2,JIRA!A:A,0)),1,0)

Let me know in case you still have any issues!

4 Comments

In using 'IF' I would flip the IF inside the INDEX: =INDEX(IF(AF2="Consultant",JIRA!F:F,IF(AF2="Retailer",JIRA!D:D,...))),MATCH...) It would eliminate the duplicate typing and shorten the formula.
@ScottCraner, not only your solutions are amazing, you yourself are a very nice person too. Thanks for your insights and may god bless you!
You are too kind. I am just here to help.
Thank you for all your help!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.