Home

Multiple IF statements

%3CLINGO-SUB%20id%3D%22lingo-sub-458301%22%20slang%3D%22en-US%22%3EMultiple%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-458301%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20looking%20at%20finding%20a%20formula%20for%3A%3C%2FP%3E%3CP%3E%3DIF(B25%3DSheet1!A2%20than%20B26%3DSheet1!B2%20and%20B27%3DSheet1!C2%20....%20and%20so%20on%20BUT%3C%2FP%3E%3CP%3E%3DIF(B25%3DSheet1!A3%20than%20B26%3DSheet1!B3%20and%20B27%3DSheet1!C3%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-458301%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-458427%22%20slang%3D%22en-US%22%3ERe%3A%20Multiple%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-458427%22%20slang%3D%22en-US%22%3E%3CP%3EIt%20seems%20that%20you%20need%20a%20formula%20like%20this%20in%20B26%2C%20copied%20down%20rows%3A%3CBR%20%2F%3E%3DINDEX(CHOOSE(1%2B(B%2425%3DSheet1!A%243)%2C%3CBR%20%2F%3ESheet1!B%242%3AJ%242%2CSheet1!B%243%3AJ%243)%2C%3CBR%20%2F%3EROW()-25)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-550455%22%20slang%3D%22en-US%22%3ERe%3A%20Multiple%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-550455%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F280482%22%20target%3D%22_blank%22%3E%40Twifoo%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20tried%20your%20formula%20and%20it%20works%20for%20the%20first%20drop%20down%2C%20but%20when%20I%20drop%20down%20to%20the%20second%20name%20which%20is%20on%26nbsp%3BSheet1!A%242%20it%20doesnt%20pick%20up%20the%20line%20he%20is%20on.%20Am%20I%20missing%20something%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-550979%22%20slang%3D%22en-US%22%3ERe%3A%20Multiple%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-550979%22%20slang%3D%22en-US%22%3EPlease%20attach%20your%20sample%20file%20so%20I%20can%20see%20what's%20causing%20the%20error.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-551012%22%20slang%3D%22en-US%22%3ERe%3A%20Multiple%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-551012%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F280482%22%20target%3D%22_blank%22%3E%40Twifoo%3C%2FA%3E%26nbsp%3BPlease%20see%20attached%20Thanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-551052%22%20slang%3D%22en-US%22%3ERe%3A%20Multiple%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-551052%22%20slang%3D%22en-US%22%3EWhat's%20the%20address%20of%20the%20formula%20you're%20referring%20to%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-551089%22%20slang%3D%22en-US%22%3ERe%3A%20Multiple%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-551089%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F280482%22%20target%3D%22_blank%22%3E%40Twifoo%3C%2FA%3E%26nbsp%3Bthe%20drop%20down%20in%20Sheet2%20B25%2C%20so%20when%20you%20choose%20PR%20it%20pre%20fills%20Sheet2%20B26%3AB29%20from%20the%20info%20in%20Sheet1%20B2%3AF2%3C%2FP%3E%3CP%3EAnd%20Im%20hoping%20that%20you%20can%20get%20it%20to%20do%20the%20same%20thing%20when%20you%20choose%20MB%20from%20the%20Sheet2%20B25%20drop%20down%20to%20pick%20up%20the%20info%20in%26nbsp%3BSheet1%20B3%3AF3%20to%20show%20in%20the%20Sheet2%20B26%3AB29%20fields%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-551119%22%20slang%3D%22en-US%22%3ERe%3A%20Multiple%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-551119%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F321726%22%20target%3D%22_blank%22%3E%40Luke_williams%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20the%20attached%20file%2C%20I%20modified%20%3CSTRONG%3ESheet2!A26%3C%2FSTRONG%3E%20from%20%22%3CSTRONG%3EManager%20Position%3C%2FSTRONG%3E%22%20to%20%22%3CSTRONG%3ERole%3C%2FSTRONG%3E%22%20so%20that%20it%20will%20coincide%20with%20%3CSTRONG%3ESheet1!C1%3C%2FSTRONG%3E.%20Thereafter%2C%20a%20simple%20VLOOKUP%20will%20return%20your%20desired%20results%20in%20%3CSTRONG%3ESheet2!B26%3AB29%3C%2FSTRONG%3E.%20Thus%2C%20the%20formula%20in%20%3CSTRONG%3ESheet2!B26%3C%2FSTRONG%3E%2C%20copied%20down%20to%20%3CSTRONG%3ESheet2!B29%3C%2FSTRONG%3E%2C%20is%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DVLOOKUP(B%2425%2CSheet1!A%242%3AG%2431%2C%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EMATCH(A26%2CSheet1!A%241%3AG%241%2C0)%2C0)%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-551200%22%20slang%3D%22en-US%22%3ERe%3A%20Multiple%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-551200%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F280482%22%20target%3D%22_blank%22%3E%40Twifoo%3C%2FA%3E%26nbsp%3BGreat!%20thank%20you%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-551428%22%20slang%3D%22en-US%22%3ERe%3A%20Multiple%20IF%20statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-551428%22%20slang%3D%22en-US%22%3EIt's%20a%20pleasure%20to%20know%20that!%3C%2FLINGO-BODY%3E
Luke_williams
Occasional Contributor

I am looking at finding a formula for:

=IF(B25=Sheet1!A2 than B26=Sheet1!B2 and B27=Sheet1!C2 .... and so on BUT

=IF(B25=Sheet1!A3 than B26=Sheet1!B3 and B27=Sheet1!C3

9 Replies

It seems that you need a formula like this in B26, copied down rows:
=INDEX(CHOOSE(1+(B$25=Sheet1!A$3),
Sheet1!B$2:J$2,Sheet1!B$3:J$3),
ROW()-25)

@Twifoo 

I have tried your formula and it works for the first drop down, but when I drop down to the second name which is on Sheet1!A$2 it doesnt pick up the line he is on. Am I missing something?

Please attach your sample file so I can see what's causing the error.

@Twifoo Please see attached Thanks.

What's the address of the formula you're referring to?

@Twifoo the drop down in Sheet2 B25, so when you choose PR it pre fills Sheet2 B26:B29 from the info in Sheet1 B2:F2

And Im hoping that you can get it to do the same thing when you choose MB from the Sheet2 B25 drop down to pick up the info in Sheet1 B3:F3 to show in the Sheet2 B26:B29 fields

 

@Luke_williams 

In the attached file, I modified Sheet2!A26 from "Manager Position" to "Role" so that it will coincide with Sheet1!C1. Thereafter, a simple VLOOKUP will return your desired results in Sheet2!B26:B29. Thus, the formula in Sheet2!B26, copied down to Sheet2!B29, is: 

=VLOOKUP(B$25,Sheet1!A$2:G$31,
MATCH(A26,Sheet1!A$1:G$1,0),0)

@Twifoo Great! thank you

It's a pleasure to know that!
Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
38 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies