SOLVED

Multi If Than Statements

%3CLINGO-SUB%20id%3D%22lingo-sub-2429451%22%20slang%3D%22en-US%22%3EMulti%20If%20Than%20Statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2429451%22%20slang%3D%22en-US%22%3E%3CP%3Eim%20attempting%20to%20make%20a%20function%20for%20auto-filling%20information%2C%20I%20need%20it%20to%20read%20a%20cell%20see%20U13%20and%20say%202008%20or%20U14%20and%202007%20and%20so%20on%3CBR%20%2F%3E%3CBR%20%2F%3EI%20made%20a%20table%20like%20this%20on%20R%20and%20S%202-8%20but%20I'm%20unsure%20how%20to%20allow%20for%20multiple%20results%20in%20the%20if%20statement.%20or%20chain%20multiple%20if%20statements%20any%20help%20would%20be%20appreciated%20my%20current%20statement%20is%20%3DIF(E2%3DR2%2CS2)%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22GNSC4_0-1623213373235.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F287366i701D818E6D41D9CD%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22GNSC4_0-1623213373235.png%22%20alt%3D%22GNSC4_0-1623213373235.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2429451%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%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-2429483%22%20slang%3D%22en-US%22%3ERe%3A%20Multi%20If%20Than%20Statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2429483%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1074329%22%20target%3D%22_blank%22%3E%40GNSC4%3C%2FA%3E%26nbsp%3BWithout%20seeing%20your%20file%20I%20would%20suggest%20you%20try%2C%20e.g.%20in%20F2%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DVLOOKUP(E2%2C%24R%242%3A%24S%248%2C2%2CFALSE)%3C%2FP%3E%3CP%3Eand%20copy%20it%20down%20in%20column%20F.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20a%20basic%20lookup%20function%2C%20that%20finds%20a%20match%20of%20the%20entries%20in%20E%20in%20the%20first%20column%20of%20the%20lookup%20table%20(R2%3AS8)%20and%20then%20return%20the%202nd%20column%20for%20matches%20found.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20use%20a%20fairly%20recent%20Excel%20version%2C%20you%20might%20also%20look%20into%20the%20XLOOKUP%20function.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2430989%22%20slang%3D%22en-US%22%3ERe%3A%20Multi%20If%20Than%20Statements%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2430989%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3BThat%20worked%20beautifully%20thank%20you%20very%20much%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

im attempting to make a function for auto-filling information, I need it to read a cell see U13 and say 2008 or U14 and 2007 and so on

I made a table like this on R and S 2-8 but I'm unsure how to allow for multiple results in the if statement. or chain multiple if statements any help would be appreciated my current statement is =IF(E2=R2,S2)

GNSC4_0-1623213373235.png

 

2 Replies
best response confirmed by GNSC4 (New Contributor)
Solution

@GNSC4 Without seeing your file I would suggest you try, e.g. in F2:

 

=VLOOKUP(E2,$R$2:$S$8,2,FALSE)

and copy it down in column F.

 

This is a basic lookup function, that finds a match of the entries in E in the first column of the lookup table (R2:S8) and then return the 2nd column for matches found.

 

If you use a fairly recent Excel version, you might also look into the XLOOKUP function.

 

 

@Riny_van_Eekelen That worked beautifully thank you very much