Lookup within multiple columns

Cyphas

New Member
Joined
Oct 23, 2021
Messages
12
Office Version
  1. 365
Platform
  1. Windows
  2. Web
I have a supplier who decided to populate data in a complex way thus making life a bit difficult in working with a form.

Item are placed like the below table.. this is just 1/8 of contents. I need to lookup in this sheet find the supplier code which is in either column A, C, E or G then return the relevant barcode number to the right of it.. so the value is in either columns B,D,F,H on the same row. Is there a VLOOKUP or equivalent formula to do this. I came across using some VLOOKUP and INDIRECT but couldnt figure out how to use in this complex instance as the main sheet I am using has a field supplier_code like 'J1' of which I need to ppopulate field sku_ean with the barcode from this sheet

JCB Barcode List Customer 02.12.21.xls
ABCDEFGH
2AMAZON
3J15055559602415J75055559602477J135055559610120J195055559631316
4J25055559602422J85055559602484J145055559610137J205055559631323
5J35055559602439J95055559602491J155055559610144J215055559631330
6J45055559602446J105055559602507J165055559610151J225055559631347
7J55055559602453J115055559602514J175055559612322J235055559631354
8J65055559602460J125055559602521J185055559612339
9
10
11AZTEC
12AL15055559602989AL65055559603030AL115055559603085AL165055559605218
13AL25055559602996AL75055559603047AL125055559603092AL175055559605225
14AL35055559603009AL85055559603054AL135055559605188AL185055559610267
15AL45055559603016AL95055559603061AL145055559605195AL195055559610274
16AL55055559603023AL105055559603078AL155055559605201AL205055559610281
17CRAFT COTTON3PLY5060019090312BLEND 25060019095614Toyball5060019095621
18ECRU5060019092026
19BLEACH5060019092033
20BABY 4PLY 100g
21BY15060019090220BY45060019090251BY85060019090299BY115055559610670
22BY25060019090237BY55060019090268BY95060019090305BY125055559610687
23BY35060019090244BY65060019090275BY105055559610663
24BABY 4PLY CONE
254BY150600190904114BY450600190904424BY850600190904804BY125055559624370
264BY250600190904284BY550600190904594BY95060019090497
274BY350600190904354BY650600190904664BY115055559624363
BARCODE MASTER


Thank you in advance for your help.

If Lookup is not ideal then is there a way to run a code to make populating in a sheet data into two columns
So I have all like

JCB Barcode List Customer 02.12.21.xls
AB
3Supplier CodeEAN
4J15055559602415
5J25055559602422
6J35055559602439
7J45055559602446
8J55055559602453
9J65055559602460
BARCODE MASTER
 
The problem is you need to change all the references to A1 into A$1 before you copy it down, you also need the $ in the references to the array. so put this in K4 and copy it down:
Excel Formula:
=IFERROR(OFFSET(A$1,MATCH(J4,A$2:A$358,0),1),"")&IFERROR(OFFSET(A$1,MATCH(J4,C$2:C$358,0),3),"")&IFERROR(OFFSET(A$1,MATCH(J4,E$2:E$358,0),5),"")&IFERROR(OFFSET(A$1,MATCH(J4,G$2:G$358,0),7),"")
Ah, that worked now. Had to save file for codes to update and reflect values
 
Upvote 0

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top