if function or match or vlookup (im not sure)

%3CLINGO-SUB%20id%3D%22lingo-sub-1477026%22%20slang%3D%22en-US%22%3Eif%20function%20or%20match%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1477026%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIm%20somewhat%20stuck%2C%20I%20have%20a%20large%20spreadsheet%20with%20different%20tabs%20because%20I%20can't%20pull%20a%20large%20report%20my%20database%20for%20now.%26nbsp%3B%20I%20am%20trying%20to%20match%20the%20values%20in%20my%20main%20sheet%20to%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1.%20return%20the%20same%20value%20in%20the%20sheet%201%20from%20sheet%202.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3Esheet%201%26nbsp%3B%3C%2FP%3E%3CTABLE%20width%3D%22319%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%22177%22%3ECode%3C%2FTD%3E%3CTD%20width%3D%2278%22%3EOutput%3C%2FTD%3E%3CTD%20width%3D%2264%22%3Eproject%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CTABLE%20width%3D%22319%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%22177%22%3EP7987-001%3C%2FTD%3E%3CTD%20width%3D%2278%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%2264%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3EP7987-001%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3EP7987-002%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Esheet%202%3C%2FP%3E%3CTABLE%20width%3D%22220%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%2292%22%3ECode%3C%2FTD%3E%3CTD%20width%3D%22128%22%3ECode2%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3EP7987-001%3C%2FTD%3E%3CTD%3EP7987-001-001%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3EP7987-002%3C%2FTD%3E%3CTD%3EP7987-001-002%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eso%20I%20want%20to%20use%26nbsp%3BP7987-001%20(sheet%201)%20and%20compare%20it%20too%26nbsp%3BP7987-001-001%20(sheet%202)%26nbsp%3B%3C%2FP%3E%3CP%3Eand%20then%20return%20a%20value.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1477026%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1477742%22%20slang%3D%22en-US%22%3ERe%3A%20if%20function%20or%20match%20or%20vlookup%20(im%20not%20sure)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1477742%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F564014%22%20target%3D%22_blank%22%3E%40Kwesi_Quartey%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECould%20you%20please%20clarify%20a%20bit%3C%2FP%3E%0A%3CP%3E-%20we%20take%20Code%20in%20Sheet1%20(e.g.%26nbsp%3B%3CSPAN%3E%26nbsp%3BP7987-001)%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E-%20find%20in%20Sheet2%20Code2%20for%20which%20first%209%20characters%20are%20equal%20to%20Code%20(e.g.%20Code2%3DP7987-001-001)%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E-%20if%20found%20take%20value%20of%20Code%20from%20Sheet2%20and%20return%20it%20into%20Output%20cell%20of%20Sheet1%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ELike%20this%20or%20something%20different%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi All 

 

Im somewhat stuck, I have a large spreadsheet with different tabs because I can't pull a large report my database for now.  I am trying to match the values in my main sheet to 

 

1. return the same value in the sheet 1 from sheet 2.  

sheet 1 

CodeOutputproject
P7987-001  
P7987-001  
P7987-002  

 

sheet 2

CodeCode2
  
P7987-001P7987-001-001
P7987-002P7987-001-002

 

so I want to use P7987-001 (sheet 1) and compare it too P7987-001-001 (sheet 2) 

and then return a value. 

 

 

1 Reply

@Kwesi_Quartey 

Could you please clarify a bit

- we take Code in Sheet1 (e.g.  P7987-001)

- find in Sheet2 Code2 for which first 9 characters are equal to Code (e.g. Code2=P7987-001-001)

- if found take value of Code from Sheet2 and return it into Output cell of Sheet1

 

Like this or something different?