SOLVED
Home

INDEX MATCH #N/A Error

%3CLINGO-SUB%20id%3D%22lingo-sub-377775%22%20slang%3D%22en-US%22%3EINDEX%20MATCH%20%23N%2FA%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-377775%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3C%2FP%3E%3CP%3Ei%20have%20a%20stock%20counter%20sheet%20to%20use%20it%20with%20barcode%20reader%26nbsp%3B%3C%2FP%3E%3CP%3Ei%20have%20the%20items%20in%20other%20sheet%20and%20wont%20to%20get%20the%20data%20when%20i%20input%20the%20barcode%20to%20get%20the%26nbsp%3B%20prodect%20ID%2C%20the%20prodect%20name%20and%20the%20UOM%3C%2FP%3E%3CP%3Ei%20have%20onle%20one%20Id%20for%20the%20items%20and%204%20to%205%20barcode%20depends%20on%20the%20UOM%3C%2FP%3E%3CP%3EI%20need%20the%20index%20understand%20the%20barcode%20and%20get%20the%20data%20for%20me%26nbsp%3B%3C%2FP%3E%3CP%3Ei%20try%20but%20no%20success%26nbsp%3B%3C%2FP%3E%3CP%3Ehow%20can%20i%20do%20that%3C%2FP%3E%3CP%3Ethank%20for%20the%20help%3C%2FP%3E%3CP%3Ebest%20regards%26nbsp%3B%3C%2FP%3E%3CP%3Esaeedom%3C%2FP%3E%3CP%3Ethere%20is%202%20Pic.%20of%20the%20sheets%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-377775%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-389058%22%20slang%3D%22en-US%22%3ERe%3A%20INDEX%20MATCH%20%23N%2FA%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-389058%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F304229%22%20target%3D%22_blank%22%3E%40Saeedom%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThis%20is%3C%2FSPAN%3E%20a%20problem%20where%20a%20sample%20Excel%20file%20would%20have%20helped%20immensely.%26nbsp%3B%20Earlier%20I%20assumed%20that%20each%20barcode%20you%20seek%20could%20appear%20within%20any%20one%20of%205%20columns%2C%20setting%20it%20outside%20the%20normal%20VLOOKUP%20scenario.%20I%20now%20believe%20you%20also%20wish%20to%20return%20the%20header%20for%20the%20column%20in%20which%20you%20find%20the%20barcode.%26nbsp%3B%20My%20approach%20is%20first%20to%20focus%20upon%20these%205%20columns%20of%20Table_ProductList.%26nbsp%3B%20Because%20the%20headings%20are%20so%20long%20I%20defined%20the%20name%20'TableData'%20to%20represent%20the%20array%20of%20reference%20barcodes.%20This%20refers%20to%3A%3C%2FP%3E%3CP%3E%3DTable_ProductList%5B%5BProduct%20Barcode%201%20Box%5D%3A%5BProduct%20Barcode%205%20Pallet%5D%5D%3C%2FP%3E%3CP%3EThe%20barcode%20I%20am%20seeking%20to%20match%20is%20a%20single%20(relative)%20value%20from%20the%20other%20table%20that%20I%20called%20'Barcode'%3A%3C%2FP%3E%3CP%3E%3DTable2%5B%40%5BProduct%20Barcode%5D%5D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20next%20step%20is%20to%20compare%20each%20element%20of%20the%20array%20for%20a%20match%20to%20the%20barcode%2C%20using%201%20to%20indicate%20the%20matching%20code%20and%200%20for%20all%20others.%26nbsp%3B%20That%20I%20called%20'arrayMatches'%20which%20refers%20to%20the%20formula%3C%2FP%3E%3CP%3E%3D%20SIGN(%20TableData%3DBarcode%20).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20table%20is%20the%20basis%20by%20which%20both%20the%20record%20(as%20above)%20and%20the%20heading%20may%20be%20returned.%26nbsp%3B%20Unfortunately%20spreadsheets%20are%20so%20focussed%20upon%20interactive%20use%20that%20there%20is%20a%20dearth%20of%20operators%20that%20act%20upon%20a%202D%20array%20by%20row%20or%20by%20column.%26nbsp%3B%20MMULT%20may%20be%20unique%20in%20that%20regard.%26nbsp%3B%20To%20calculate%20the%20sum%20over%20columns%20for%20each%20row%2C%20one%20has%20'columnMatches'%3C%2FP%3E%3CP%3E%3D%201%20%2F%20MMULT(%20arrayMatches%2C%20%7B1%3B1%3B1%3B1%3B1%7D%20)%3C%2FP%3E%3CP%3EThis%20column%20has%201%20for%20the%20row%20containing%20the%20matched%20barcode%20and%20a%20%23DIV%2F0!%20error%20for%20all%20other%20rows.%26nbsp%3B%20LOOKUP%20can%20be%20used%20to%20return%20the%20corresponding%20value%20from%20any%20other%20column%3C%2FP%3E%3CP%3E%3D%20LOOKUP(%201%2C%20columnMatches%2C%20Table_ProductList%5BItem%5D%20)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETo%20return%20the%20heading%20from%20the%20array%20of%20matches%20is%20a%20very%20similar%20process%20except%20it%20is%20each%20column%20that%20has%20to%20be%20summed%2C%20returning%20a%20row%20with%20a%20single%201%20for%20the%20match%20and%20%23DIV%2F0!%20error%20for%20other%20columns%2C%20namely%20'rowMatches'%3C%2FP%3E%3CP%3E%3D%201%20%2F%20MMULT(%20U%2C%20arrayMatches%20)%3C%2FP%3E%3CP%3EThe%20other%20thing%20one%20needs%20to%20evaluate%20this%20formula%20is%20the%20row%20array%20of%201s%2C%20'U'%2C%20the%20is%20the%20same%20length%20and%20the%20table%20has%20rows.%26nbsp%3B%20'U'%20is%20given%20by%3C%2FP%3E%3CP%3E%3D%20TRANSPOSE(%20SIGN(%20ROW(TableData)%20)%20)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20appropriate%20table%20header%20is%20returned%20by%20what%20is%2C%20in%20effect%2C%20an%20HLOOKUP%2C%20namely%3C%2FP%3E%3CP%3E%3D%20LOOKUP(%201%2C%20rowMatches%2C%20HeadingUIC%20)%3C%2FP%3E%3CP%3Ewhere%20'HeadingUIC'%20are%20the%20headings%20of%20the%205%20columns%3C%2FP%3E%3CP%3E%3DTable_ProductList%5B%5B%23Headers%5D%2C%5BProduct%20Barcode%201%20Box%5D%3A%5BProduct%20Barcode%205%20Pallet%5D%5D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20appreciate%20this%20is%20heavy-going%20and%20involves%20approaches%20that%20are%20alien%20to%20normal%20spreadsheet%20development%20but%20I%20hope%20it%20will%20provide%20some%20insight.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-388915%22%20slang%3D%22en-US%22%3ERe%3A%20INDEX%20MATCH%20%23N%2FA%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-388915%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F304229%22%20target%3D%22_blank%22%3E%40Saeedom%3C%2FA%3E%26nbsp%3B%2C%20you%20are%20welcome%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-388904%22%20slang%3D%22en-US%22%3ERe%3A%20INDEX%20MATCH%20%23N%2FA%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-388904%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethank%20you%20from%20the%20heart%26nbsp%3B%3C%2FP%3E%3CP%3Eit%20works%20with%20some%20change%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20really%20cant't%20thank%20you%20enough%26nbsp%3B%3C%2FP%3E%3CP%3Eand%20also%20can't%20forget%20Mr.%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F214174%22%20target%3D%22_blank%22%3E%40Peter%20Bartholomew%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Eall%20the%20best%20for%20you%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Emy%20regards%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-388753%22%20slang%3D%22en-US%22%3ERe%3A%20INDEX%20MATCH%20%23N%2FA%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-388753%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F304229%22%20target%3D%22_blank%22%3E%40Saeedom%3C%2FA%3E%26nbsp%3B%2C%20that%20will%20be%20like%3C%2FP%3E%0A%3CPRE%3E%3DINDEX(list!%24C%242%3A%24G%242%2C%0ASUMPRODUCT((Table_ProductList%20%3D%20%5B%40%5BProduct%20Barcode%5D%5D%20)*COLUMN(Table_ProductList))-COLUMN(Table_ProductList%5B%5B%23Headers%5D%2C%5BProduct%20Barcode%201%20BOX%5D%5D)%2B1)%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-388730%22%20slang%3D%22en-US%22%3ERe%3A%20INDEX%20MATCH%20%23N%2FA%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-388730%22%20slang%3D%22en-US%22%3E%3CP%3ENope%2C%20I%20was%20wrong%20-%20will%20play%20with%20the%20model%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-388721%22%20slang%3D%22en-US%22%3ERe%3A%20INDEX%20MATCH%20%23N%2FA%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-388721%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F304229%22%20target%3D%22_blank%22%3E%40Saeedom%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDo%20I%20understand%20correctly%20what%20other%20words%20you'd%20like%20to%20return%20in%20which%20column%20of%20the%20list%20the%20barcode%20was%20found%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20didn't%20test%2C%20but%20Peter's%20formula%20shall%20work%3C%2FP%3E%0A%3CPRE%3E%3D%20LOOKUP(%201%2C%201%20%2F%20MMULT(%0ASIGN(%20Table_ProductList%5B%5BProduct%20Barcode%201%20BOX%5D%3A%5BProduct%20Barcode%205%20pallet%5D%5D%20%3D%20%5B%40%5BProduct%20Barcode%5D%5D%20)%2C%0A%7B1%3B1%3B1%3B1%3B1%7D%20)%2C%0Alist!%24C%242%3A%24G%242%20)%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-388644%22%20slang%3D%22en-US%22%3ERe%3A%20INDEX%20MATCH%20%23N%2FA%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-388644%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHI%26nbsp%3B%3C%2FP%3E%3CP%3Ecan%20you%20please%20help%20with%20UOM%20i%20need%20it%20to%20just%20take%20the%20header%20name%20back%20to%20the%20count%20list%20sheet%20in%20the%20UOM%20column%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-386730%22%20slang%3D%22en-US%22%3ERe%3A%20INDEX%20MATCH%20%23N%2FA%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-386730%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F214174%22%20target%3D%22_blank%22%3E%40Peter%20Bartholomew%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%3C%2FP%3E%3CP%3Ecan%20you%20please%20help%20with%20the%20UOM%20so%20when%20i%20reed%20a%20box%20barcode%20i%20can%20see%20the%20unit%20there%20or%20roll%20and%20get%20that%20data%20from%20the%20header%20barcode%20that%20i%20have%26nbsp%3B%3C%2FP%3E%3CP%3Ei%20try%20the%20formula%20you%20put%20and%20try%20to%20change%20it%20but%20i%20get%20wrong%20answer%26nbsp%3B%3C%2FP%3E%3CP%3Ethanks%20from%20the%20heart%26nbsp%3B%3C%2FP%3E%3CP%3Emy%20regards%26nbsp%3B%3C%2FP%3E%3CP%3Esaeed%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-379321%22%20slang%3D%22en-US%22%3ERe%3A%20INDEX%20MATCH%20%23N%2FA%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-379321%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F214174%22%20target%3D%22_blank%22%3E%40Peter%20Bartholomew%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20the%20help%26nbsp%3B%3C%2FP%3E%3CP%3Eyes%20that%20what%20I%20need%20to%20do%26nbsp%3B%3C%2FP%3E%3CP%3Ethe%20lookup%20formula%20work%20for%20me%20the%20other%20one%20not%20working%20but%20thats%20ok.%20i%20need%20only%20one%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%20i%20try%20to%20use%20the%20formula%20for%20the%20product%20barcode%20UOM%20(Unit%20Of%20Measurement)%20to%20the%20same%20table%2C%20but%20it%20gives%20wrong%20answer.%20How%20i%20can%20fix%26nbsp%3B%20the%20formula%20to%20get%20only%26nbsp%3B%20the%20header%20name%20of%20the%20specified%20barcode%20column.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-378519%22%20slang%3D%22en-US%22%3ERe%3A%20INDEX%20MATCH%20%23N%2FA%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-378519%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F304229%22%20target%3D%22_blank%22%3E%40Saeedom%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESorry%2C%20I%20have%20only%20just%20understood%20what%20it%20is%20you%20are%20trying%20to%20do.%26nbsp%3B%20I%20believe%20you%20are%20trying%20to%20find%20a%20match%20in%20any%20one%20of%205%20columns%20and%20to%20return%20the%20product%20name.%26nbsp%3B%20You%20would%20need%205%20separate%20MATCH%20formulas%20for%20that%20and%20then%20take%20the%20maximum%20of%20the%205%20row-%3CSPAN%3Eindices%20%3C%2FSPAN%3Ebefore%20using%20INDEX.%20%26nbsp%3B%3C%2FP%3E%3CP%3EAlternatively%20you%20could%20use%20non-standard%20formulas%20such%20as%3C%2FP%3E%3CP%3E%3D%20LOOKUP(%201%2C%201%20%2F%20MMULT(%3C%2FP%3E%3CP%3ESIGN(%20Table_ProductList%5B%5BProduct%20Barcode%201%20BOX%5D%3A%5BProduct%20Barcode%205%20pallet%5D%5D%20%3D%20%5B%40%5BProduct%20Barcode%5D%5D%20)%2C%3C%2FP%3E%3CP%3E%7B1%3B1%3B1%3B1%3B1%7D%20)%2C%3C%2FP%3E%3CP%3ETable_ProductList%5BItem%5D%20)%3C%2FP%3E%3CP%3Eor%3C%2FP%3E%3CP%3E%3D%20CONCAT(%3C%2FP%3E%3CP%3EIF(%20Table_ProductList%5B%5BProduct%20Barcode%201%20BOX%5D%3A%5BProduct%20Barcode%205%20pallet%5D%5D%20%3D%20%5BProduct%20Barcode%5D%2C%3C%2FP%3E%3CP%3ETable_ProductList%5BItem%5D%2C%20%22%22%20)%20)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-378194%22%20slang%3D%22en-US%22%3ERe%3A%20INDEX%20MATCH%20%23N%2FA%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-378194%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F304229%22%20target%3D%22_blank%22%3E%40Saeedom%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20is%20not%20the%20INDEX%2FMATCH%20that%20is%20in%20error.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20is%20the%20way%20in%20which%20you%20are%20treating%20the%20bar-codes%20as%20numbers.%26nbsp%3B%20You%20say%20the%20bar-codes%20are%203%20to%205%20digits%20long%20but%20your%20picture%20shows%2016%20digit%20codes%20which%20is%20more%20than%20can%20be%20stored%20as%20an%20Excel%20number.%20%26nbsp%3B%20Your%20formula%20also%20shows%20bar-codes%20being%20added%20'%2B'%20which%20does%20not%20make%20much%20sense.%20%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E's%20suggestion%20of%20concatenation%20'%26amp%3B'%20would%20provide%20a%20better%20basis%20for%20comparison.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ep.s.%20If%20you%20really%20wish%20to%20combine%20bar-codes%20as%20arithmetic%20values%20then%20you%20would%20need%3C%2FP%3E%3CP%3E%3D%20codeA%20*%2010%5ELEN(codeB)%20%2B%20codeB%3C%2FP%3E%3CP%3Ebut%20care%20needs%20to%20be%20taken%20that%20the%20resulting%20number%20must%20not%20go%20beyond%2015%20digits.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-378162%22%20slang%3D%22en-US%22%3ERe%3A%20INDEX%20MATCH%20%23N%2FA%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-378162%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%26nbsp%3B%3C%2FP%3E%3CP%3EI%20try%20like%20this%20(%26amp%3B)%20and%20it%20didn't%20work%26nbsp%3B%3C%2FP%3E%3CP%3Ealso%20(%3A)%20and%20not%20working%26nbsp%3B%3C%2FP%3E%3CP%3Eonly%20work%20if%20I%20choose%20one%20column%26nbsp%3B%3C%2FP%3E%3CP%3Eis%20there%20a%20way%20to%20fix%20this%20or%20there%20is%20another%20formula%26nbsp%3B%3C%2FP%3E%3CP%3Eplease%20help%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-377873%22%20slang%3D%22en-US%22%3ERe%3A%20INDEX%20MATCH%20%23N%2FA%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-377873%22%20slang%3D%22en-US%22%3EIt%E2%80%99s%20number%3CBR%20%2F%3EAll%20the%20items%20I%20have%20in%20the%20list%20have%203%20to%205%20numbers%20barcodes%3CBR%20%2F%3EDepends%20on%20the%20unit%20of%20measurement%20each%20unit%20have%20a%20special%20barcode%20and%20when%20I%20use%20the%20barcode%20reader%20in%20the%20stock%20counter%20I%20need%20the%20item%20ID%20and%20the%20product%20name%20and%20the%20unit%20of%20measurement%20fill%20up%20in%20the%20table%3CBR%20%2F%3EIs%20there%20another%20way%20or%20I%20use%20the%20wrong%20index%20and%20match%20function%3CBR%20%2F%3ECan%20you%20please%20write%20down%20the%20formula%20that%20I%20need%20if%20you%20need%20more%20picture%20I%20will%20happily%20send%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-377800%22%20slang%3D%22en-US%22%3ERe%3A%20INDEX%20MATCH%20%23N%2FA%20Error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-377800%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F304229%22%20target%3D%22_blank%22%3E%40Saeedom%3C%2FA%3E%26nbsp%3B%2C%20your%20barcodes%20are%20texts%20or%20numbers%3F%20It%20looks%20like%20texts%20based%20on%20length.%20Use%20concatenate%20then%20(%26amp%3B).%20And%20in%20your%20case%20it%20will%20be%20array%20formula%20(Ctrl%2BShift%2BEnter)%3C%2FP%3E%3C%2FLINGO-BODY%3E
Saeedom
Occasional Contributor

Hi 

i have a stock counter sheet to use it with barcode reader 

i have the items in other sheet and wont to get the data when i input the barcode to get the  prodect ID, the prodect name and the UOM

i have onle one Id for the items and 4 to 5 barcode depends on the UOM

I need the index understand the barcode and get the data for me 

i try but no success 

how can i do that

thank for the help

best regards 

saeedom

there is 2 Pic. of the sheets 

 

14 Replies

Hi@Saeedom , your barcodes are texts or numbers? It looks like texts based on length. Use concatenate then (&). And in your case it will be array formula (Ctrl+Shift+Enter)

It’s number
All the items I have in the list have 3 to 5 numbers barcodes
Depends on the unit of measurement each unit have a special barcode and when I use the barcode reader in the stock counter I need the item ID and the product name and the unit of measurement fill up in the table
Is there another way or I use the wrong index and match function
Can you please write down the formula that I need if you need more picture I will happily send

@Sergei Baklan 

Hi 

I try like this (&) and it didn't work 

also (:) and not working 

only work if I choose one column 

is there a way to fix this or there is another formula 

please help

@Saeedom 

It is not the INDEX/MATCH that is in error.

 

It is the way in which you are treating the bar-codes as numbers.  You say the bar-codes are 3 to 5 digits long but your picture shows 16 digit codes which is more than can be stored as an Excel number.   Your formula also shows bar-codes being added '+' which does not make much sense.  @Sergei Baklan's suggestion of concatenation '&' would provide a better basis for comparison.

 

p.s. If you really wish to combine bar-codes as arithmetic values then you would need

= codeA * 10^LEN(codeB) + codeB

but care needs to be taken that the resulting number must not go beyond 15 digits.

Solution

@Saeedom 

Sorry, I have only just understood what it is you are trying to do.  I believe you are trying to find a match in any one of 5 columns and to return the product name.  You would need 5 separate MATCH formulas for that and then take the maximum of the 5 row-indices before using INDEX.  

Alternatively you could use non-standard formulas such as

= LOOKUP( 1, 1 / MMULT(

SIGN( Table_ProductList[[Product Barcode 1 BOX]:[Product Barcode 5 pallet]] = [@[Product Barcode]] ),

{1;1;1;1;1} ),

Table_ProductList[Item] )

or

= CONCAT(

IF( Table_ProductList[[Product Barcode 1 BOX]:[Product Barcode 5 pallet]] = [Product Barcode],

Table_ProductList[Item], "" ) )

@Peter Bartholomew 

Thanks for the help 

yes that what I need to do 

the lookup formula work for me the other one not working but thats ok. i need only one

 

Now i try to use the formula for the product barcode UOM (Unit Of Measurement) to the same table, but it gives wrong answer. How i can fix  the formula to get only  the header name of the specified barcode column. 

 

@Peter Bartholomew 

Hi

can you please help with the UOM so when i reed a box barcode i can see the unit there or roll and get that data from the header barcode that i have 

i try the formula you put and try to change it but i get wrong answer 

thanks from the heart 

my regards 

saeed 

@Sergei Baklan 

HI 

can you please help with UOM i need it to just take the header name back to the count list sheet in the UOM column 

Hi @Saeedom ,

 

Do I understand correctly what other words you'd like to return in which column of the list the barcode was found?

 

I didn't test, but Peter's formula shall work

= LOOKUP( 1, 1 / MMULT(
SIGN( Table_ProductList[[Product Barcode 1 BOX]:[Product Barcode 5 pallet]] = [@[Product Barcode]] ),
{1;1;1;1;1} ),
list!$C$2:$G$2 )

 

Nope, I was wrong - will play with the model

@Saeedom , that will be like

=INDEX(list!$C$2:$G$2,
SUMPRODUCT((Table_ProductList = [@[Product Barcode]] )*COLUMN(Table_ProductList))-COLUMN(Table_ProductList[[#Headers],[Product Barcode 1 BOX]])+1)

 

@Sergei Baklan 

thank you from the heart 

it works with some change 

I'm really cant't thank you enough 

and also can't forget Mr.@Peter Bartholomew 

all the best for you

my regards 

@Saeedom , you are welcome

@Saeedom 

This is a problem where a sample Excel file would have helped immensely.  Earlier I assumed that each barcode you seek could appear within any one of 5 columns, setting it outside the normal VLOOKUP scenario. I now believe you also wish to return the header for the column in which you find the barcode.  My approach is first to focus upon these 5 columns of Table_ProductList.  Because the headings are so long I defined the name 'TableData' to represent the array of reference barcodes. This refers to:

=Table_ProductList[[Product Barcode 1 Box]:[Product Barcode 5 Pallet]]

The barcode I am seeking to match is a single (relative) value from the other table that I called 'Barcode':

=Table2[@[Product Barcode]]

 

The next step is to compare each element of the array for a match to the barcode, using 1 to indicate the matching code and 0 for all others.  That I called 'arrayMatches' which refers to the formula

= SIGN( TableData=Barcode ).

 

This table is the basis by which both the record (as above) and the heading may be returned.  Unfortunately spreadsheets are so focussed upon interactive use that there is a dearth of operators that act upon a 2D array by row or by column.  MMULT may be unique in that regard.  To calculate the sum over columns for each row, one has 'columnMatches'

= 1 / MMULT( arrayMatches, {1;1;1;1;1} )

This column has 1 for the row containing the matched barcode and a #DIV/0! error for all other rows.  LOOKUP can be used to return the corresponding value from any other column

= LOOKUP( 1, columnMatches, Table_ProductList[Item] )

 

To return the heading from the array of matches is a very similar process except it is each column that has to be summed, returning a row with a single 1 for the match and #DIV/0! error for other columns, namely 'rowMatches'

= 1 / MMULT( U, arrayMatches )

The other thing one needs to evaluate this formula is the row array of 1s, 'U', the is the same length and the table has rows.  'U' is given by

= TRANSPOSE( SIGN( ROW(TableData) ) )

 

The appropriate table header is returned by what is, in effect, an HLOOKUP, namely

= LOOKUP( 1, rowMatches, HeadingUIC )

where 'HeadingUIC' are the headings of the 5 columns

=Table_ProductList[[#Headers],[Product Barcode 1 Box]:[Product Barcode 5 Pallet]]

 

I appreciate this is heavy-going and involves approaches that are alien to normal spreadsheet development but I hope it will provide some insight.

Related Conversations
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
14 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
23 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies