Weird MATCH error

%3CLINGO-SUB%20id%3D%22lingo-sub-2670087%22%20slang%3D%22en-US%22%3EWeird%20MATCH%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2670087%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20connect%20data%20from%20one%20excel%20file%20to%20another%2C%20using%20INDEX%20and%20MATCH.%20The%20problem%20is%20with%20the%20MATCH%20function.%20When%20I%20try%20just%20the%20MATCH%20function%2C%20I%20get%20%23N%2FA%20as%20if%20it%20can't%20find%20the%20value%20I%20am%20looking%20up.%20The%20values%20are%20CIP%20codes%2C%20so%20they%20are%20numbers%20but%20without%20any%20actual%20numerical%20value.%20I've%20tried%20formatting%20both%20sets%20of%20values%20in%20the%20two%20sheets%20as%20text%20and%20as%20number%20without%20success.%20What%20has%20worked%20is%20going%20into%20each%20individual%20cell%20and%20clicking%20Enter.%20I%20thought%20maybe%20there%20were%20some%20hidden%20characters%20in%20there%2C%20so%20I%20tried%20CLEAN%20and%20TRIM%2C%20too%2C%20without%20success.%20I%20have%20several%20more%20sheets%20to%20go%20with%20hundreds%20of%20rows%20of%20data%2C%20and%20I%20don't%20want%20to%20open%20each%20one%2C%20click%20in%20each%20cell%2C%20and%20hit%20Enter%2C%20but%20I%20will%20if%20no%20one%20can%20help%20me%20figure%20this%20out.%20Why%20would%20that%20even%20work%3F%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2670087%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2670746%22%20slang%3D%22en-US%22%3ERe%3A%20Weird%20MATCH%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2670746%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1133485%22%20target%3D%22_blank%22%3E%40annefensie%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20text%20format%20was%20applied%20to%20the%20cell%2C%20you%20enter%20123%20into%20it%2C%20it%20will%20be%20text%20%22123%22.%20If%20to%20apply%20number%20format%20to%20the%20cell%20it%20still%20will%20be%20text%20%22123%22%20in%20the%20cell.%20Applying%20of%20format%20doesn't%20convert%20text%20to%20number%2C%20you%20shall%20to%20re-enter%20the%20value.%20F2%20-%26gt%3B%20Enter%20and%20now%20you%20have%20number%20value.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EText%20To%20Columns%20is%20most%20common%20way%20to%20re-enter%20values%20at%20once%20if%20the%20they%20are%20in%20one%20column.%20Step-by-step%20instruction%20is%20here%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.groovypost.com%2Fhowto%2Frefresh-cell-data-number-formatting-excel%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EHow%20to%20Refresh%20Cell%20Data%20After%20Applying%20Number%20Formatting%20in%20Excel%20(groovypost.com)%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2671151%22%20slang%3D%22en-US%22%3ERe%3A%20Weird%20MATCH%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2671151%22%20slang%3D%22en-US%22%3EOr%20you%20can%20use%20numbervalue%20function%20in%20your%20formula%20to%20change%20texts%20to%20numbers%20on%20the%20fly)%3CBR%20%2F%3EArtur%3C%2FLINGO-BODY%3E
Occasional Visitor

I am trying to connect data from one excel file to another, using INDEX and MATCH. The problem is with the MATCH function. When I try just the MATCH function, I get #N/A as if it can't find the value I am looking up. The values are CIP codes, so they are numbers but without any actual numerical value. I've tried formatting both sets of values in the two sheets as text and as number without success. What has worked is going into each individual cell and clicking Enter. I thought maybe there were some hidden characters in there, so I tried CLEAN and TRIM, too, without success. I have several more sheets to go with hundreds of rows of data, and I don't want to open each one, click in each cell, and hit Enter, but I will if no one can help me figure this out. Why would that even work??

3 Replies

@annefensie 

If text format was applied to the cell, you enter 123 into it, it will be text "123". If to apply number format to the cell it still will be text "123" in the cell. Applying of format doesn't convert text to number, you shall to re-enter the value. F2 -> Enter and now you have number value.

 

Text To Columns is most common way to re-enter values at once if the they are in one column. Step-by-step instruction is here How to Refresh Cell Data After Applying Number Formatting in Excel (groovypost.com)

Or you can use numbervalue function in your formula to change texts to numbers on the fly)
Artur

@artup720 

If only you don't use PivotTable or like for the analysis.