Home > database >  Excel IF THEN Nested Formula Across Multiple Columns
Excel IF THEN Nested Formula Across Multiple Columns

Time:12-10

I have three columns (col1, col2, and col3) which I need to use a nested formula to output into col4.

The logic is as follows:

  • IF col3 = Yes AND IF (col1 = col2) THEN Sales Opportunity
  • IF col3 = Yes AND IF (col1 <> col2) THEN Partner Opportunity
  • IF col3 = No THEN ""

So far I've put together a combination of different formulas, none of which seem to create any meaningful results. Two of the following examples:

=IF(AND(AX28="Yes",F28=D28),"CLM Opportunity"),IF(AND(AX28="Yes",F28<>D28),"Partner Opportunity","")
=IF(OR(AND(AX35="Yes",F35=D35),AND(AX35="Yes",F35<>D35)),"CLM Opportunity","Partner Opportunity")

How the nested formulas should output:

Col1 Col2 Col3 Col4
Amy Amy Yes Sales Op
Cedric Pete Yes Partner Op
Amelia Amelia No

Any help is greatly appreciated!

CodePudding user response:

Use a nested IF:

=IF(C2="Yes",IF(A2=B2,"Sales Op","Partner Op"),"")

enter image description here

Logic:

enter image description here

  • Related