Need to find a match
Not sure how to explain, but here goes. I am getting some barcoding software to track the shipmaent of some products. When I receive the products they come with an Excel speadsheet that contains information about the person(s) they are going to. Each product will have a Barcode with a number imbedded in it that is already present in the Excel Spreadsheet. I'm looking for a way for the number in the barcode to find it's matching barcode in the Excel spreadsheet and populate in a determined cell on the same row. Example 798556 Mr. John Doe 3200 Phillip Lake Dr. Northport AL 35406 798556 The first number "798856" is already present. The second "798556" has been scanned and inputted. I need the second one, when scanned to find it's match and populate a cell on the same row. Is this possible to do in Excel? ANy help would be great! Thanks! :) :) :) :) :) -- adamkane ------------------------------------------------------------------------ adamkane's Profile: http://www.excelforum.com/member.php...o&userid=29750 View this thread: http://www.excelforum.com/showthread...hreadid=494640 |
Need to find a match
Dim rng as Range
Dim res as Variant Dim BarCodeNumber as Long With Worksheets("Data") set rng = .range(.Range("A1'),.Range("A1").End(xldown)) End with res = application.Match(BarCodeNumber,rng,0) if not iserror res then set rng1 = rng(res) ' rng1.offset(0,5) = "Yes" else msgbox BarCodeNumber & " was not found" end if Make sure that BarCodeNumber is typed the same as the numbers are stored in Excel, because the string "123" does not match the number 123. -- Regards, Tom Ogilvy "adamkane" wrote in message ... Not sure how to explain, but here goes. I am getting some barcoding software to track the shipmaent of some products. When I receive the products they come with an Excel speadsheet that contains information about the person(s) they are going to. Each product will have a Barcode with a number imbedded in it that is already present in the Excel Spreadsheet. I'm looking for a way for the number in the barcode to find it's matching barcode in the Excel spreadsheet and populate in a determined cell on the same row. Example 798556 Mr. John Doe 3200 Phillip Lake Dr. Northport AL 35406 798556 The first number "798856" is already present. The second "798556" has been scanned and inputted. I need the second one, when scanned to find it's match and populate a cell on the same row. Is this possible to do in Excel? ANy help would be great! Thanks! :) :) :) :) :) -- adamkane ------------------------------------------------------------------------ adamkane's Profile: http://www.excelforum.com/member.php...o&userid=29750 View this thread: http://www.excelforum.com/showthread...hreadid=494640 |
All times are GMT +1. The time now is 06:45 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com