SOLVED
Home

IF(ISNUMBER(SEARCH with INDEX MATCH

%3CLINGO-SUB%20id%3D%22lingo-sub-820531%22%20slang%3D%22en-US%22%3EIF(ISNUMBER(SEARCH%20with%20INDEX%20MATCH%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-820531%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESee%20image%20of%20sample%20data%20below%20for%20reference.%20I%20am%20looking%20for%20help%20to%20insert%20value%20of%20Sheet1%2C%20Row1%20Column%20Header%20based%20on%20if%20the%20text%20is%20also%20in%20Column%20B%2C%20Sheet2%20of%20the%20row%20of%20the%20Matching%20Unique%20ID.%20In%20the%20sample%20below%2C%20I%20have%20manually%20used%20IF(ISNUMBER)%20for%20Sheet%201%20row%202%20to%20show%20target%20end%20result.%20However%2C%20this%20does%20not%20contain%20any%20matching%20of%20unique%20ID.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20goal%20is%20for%20sheet%201%20to%20be%20a%20template%20for%20when%20new%20data%20comes%20into%20sheet%202%20(which%20is%20an%20export%20from%20a%20separate%20source)%20I%20can%20automate%20population%20of%20the%20data%20on%20sheet%201.%20I%20believe%20I%20would%20need%20to%20use%20a%20combination%20of%20IF(ISNUMBER%20and%20INDEX%20MATCH%20but%20have%20been%20unsuccessful%20thus%20far.%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%2F128238iD40E549BC27E59A3%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_0.png%22%20title%3D%22clipboard_image_0.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-820531%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-820791%22%20slang%3D%22en-US%22%3ERe%3A%20IF(ISNUMBER(SEARCH%20with%20INDEX%20MATCH%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-820791%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F397502%22%20target%3D%22_blank%22%3E%40pcassidy%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20such%20sample%3C%2FP%3E%0A%3CP%3ESheet1%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20369px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F128282iD3B6AB26B860C863%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%3ESheet2%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20190px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F128283i2A3CBDB994379C02%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%3Eformula%20in%20Sheet1!B2%20could%20be%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3DIF(ISNA(MATCH(1%2C%20INDEX(%20(%24A2%3DSheet2!%24A%241%3AINDEX(Sheet2!%24A%3A%24A%2CCOUNTA(Sheet2!%24A%3A%24A)))*ISNUMBER(SEARCH(B%241%2CSheet2!%24B%241%3AINDEX(Sheet2!%24B%3A%24B%2CCOUNTA(Sheet2!%24A%3A%24A))))%2C%200)%2C%200))%2C%22%22%2CB%241)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3Eand%20drag%20it%20the%20right%20and%20down.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20general%20that%20could%20be%20done%20by%20Power%20Query.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-822861%22%20slang%3D%22en-US%22%3ERe%3A%20IF(ISNUMBER(SEARCH%20with%20INDEX%20MATCH%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-822861%22%20slang%3D%22en-US%22%3EThank%20you%20Sergei!%20This%20works%20perfectly.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-822927%22%20slang%3D%22en-US%22%3ERe%3A%20IF(ISNUMBER(SEARCH%20with%20INDEX%20MATCH%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-822927%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F397502%22%20target%3D%22_blank%22%3E%40pcassidy%3C%2FA%3E%26nbsp%3B%2C%20you%20are%20welcome%3C%2FP%3E%3C%2FLINGO-BODY%3E
pcassidy
New Contributor

Hello,

 

See image of sample data below for reference. I am looking for help to insert value of Sheet1, Row1 Column Header based on if the text is also in Column B, Sheet2 of the row of the Matching Unique ID. In the sample below, I have manually used IF(ISNUMBER) for Sheet 1 row 2 to show target end result. However, this does not contain any matching of unique ID.

 

My goal is for sheet 1 to be a template for when new data comes into sheet 2 (which is an export from a separate source) I can automate population of the data on sheet 1. I believe I would need to use a combination of IF(ISNUMBER and INDEX MATCH but have been unsuccessful thus far.

clipboard_image_0.png

3 Replies
Solution

@pcassidy 

For such sample

Sheet1

image.png

Sheet2

image.png

formula in Sheet1!B2 could be

=IF(ISNA(MATCH(1, INDEX( ($A2=Sheet2!$A$1:INDEX(Sheet2!$A:$A,COUNTA(Sheet2!$A:$A)))*ISNUMBER(SEARCH(B$1,Sheet2!$B$1:INDEX(Sheet2!$B:$B,COUNTA(Sheet2!$A:$A)))), 0), 0)),"",B$1)

and drag it the right and down.

 

In general that could be done by Power Query.

Thank you Sergei! This works perfectly.

@pcassidy , you are welcome