Home

IF function when there is 12 possible outcomes

%3CLINGO-SUB%20id%3D%22lingo-sub-663009%22%20slang%3D%22en-US%22%3EIF%20function%20when%20there%20is%2012%20possible%20outcomes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-663009%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20any%20help%20gratefully%20received.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20sheet%20that%20looks%20up%20data%20and%20returns%20either%26nbsp%3B3A%203B%203C%20or%203D%20in%20one%20cell%20and%201%2C%202%20or%203%20in%20the%20adjacent%20cell.%20So%20two%20cells%20side%20by%20side.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20a%20third%20column%20I%20then%20need%20that%20cell%20to%20return%20the%20appropriate%20statement%20that%20I've%20entered%20(in%20a%20different%20sheet%20within%20the%20same%20workbook)%20based%20upon%20whatever%20combination%20of%20these%20two%20things%20there%20are.%20So%2012%20possible%20combinations%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20I%20want%20to%20know%20how%20to%20write%20a%20formula%20which%20will%20return%20a%20outcome%20for%20each%20of%20the%20possible%20outcomes%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-663009%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-663051%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20function%20when%20there%20is%2012%20possible%20outcomes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-663051%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F353128%22%20target%3D%22_blank%22%3E%40Chestnut502%3C%2FA%3E%26nbsp%3B%2C%20that%20could%20be%20like%3C%2FP%3E%0A%3CPRE%3E%3DINDEX(%26lt%3Bstatements%20range%26gt%3B%2C%0A%20%20MATCH(1%2CINDEX(%0A%20%20%20%20%20%20%20%20%20(%26lt%3BID1%20of%20statements%20range%26gt%3B%3D%26lt%3Bcell1%26gt%3B)*%0A%20%20%20%20%20%20%20%20%20(%26lt%3BID2%20of%20statements%20range%26gt%3B%3D%26lt%3Bcell2%26gt%3B)%2C0)%20%2C%200)%0A)%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-663135%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20function%20when%20there%20is%2012%20possible%20outcomes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-663135%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3Breally%20appreciate%20you%20taking%20the%20time%20to%20help%20me%20out.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWould%20you%20mind%20taking%20a%20look%20at%20what%20I%20have%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20tried%20what%20you%20suggested%20but%20I%20don't%20actually%20work%20with%20excel%20on%20a%20day%20to%20day%20basis%20so%20I'm%20struggling.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20the%20situation%20below%20I%20would%20need%20it%20to%20see%20John%20is%203D%20and%20group%202%20and%20consequently%20want%20it%20to%20allocate%20the%20correct%20colour%20to%20his%20name.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20again%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F116889iE8FF73FA7FE3FBFA%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22Spreadsheet.bmp%22%20title%3D%22Spreadsheet.bmp%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-675909%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20function%20when%20there%20is%2012%20possible%20outcomes%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-675909%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F353128%22%20target%3D%22_blank%22%3E%40Chestnut502%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20this%20sample%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20557px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F117373iC43768946BC71257%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3Ethe%20formula%20is%3C%2FP%3E%0A%3CPRE%3E%3DINDEX(%24D%244%3A%24D%2415%2CMATCH(1%2CINDEX((%24B%244%3A%24B%2415%3D%24K4)*(%24C%244%3A%24C%2415%3D%24L4)%2C0)%2C0))%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Chestnut502
New Contributor

Hi any help gratefully received.

 

I have a sheet that looks up data and returns either 3A 3B 3C or 3D in one cell and 1, 2 or 3 in the adjacent cell. So two cells side by side.

 

In a third column I then need that cell to return the appropriate statement that I've entered (in a different sheet within the same workbook) based upon whatever combination of these two things there are. So 12 possible combinations?

 

So I want to know how to write a formula which will return a outcome for each of the possible outcomes? 

 

Thanks in advance.

3 Replies

@Chestnut502 , that could be like

=INDEX(<statements range>,
  MATCH(1,INDEX(
         (<ID1 of statements range>=<cell1>)*
         (<ID2 of statements range>=<cell2>),0) , 0)
)

 

Thank you @Sergei Baklan really appreciate you taking the time to help me out.

 

Would you mind taking a look at what I have?

 

I have tried what you suggested but I don't actually work with excel on a day to day basis so I'm struggling.

 

In the situation below I would need it to see John is 3D and group 2 and consequently want it to allocate the correct colour to his name. 

 

Thanks again,

 

Spreadsheet.bmp

@Chestnut502 ,

 

For this sample

image.png

the formula is

=INDEX($D$4:$D$15,MATCH(1,INDEX(($B$4:$B$15=$K4)*($C$4:$C$15=$L4),0),0))
Related Conversations
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
2 Replies
Early preview of Microsoft Edge group policies
Sean Lyndersay in Discussions on
65 Replies
*Updated 9/3* Syncing in Microsoft Edge Preview Channels
Elliot Kirk in Articles on
202 Replies