VLOOKUP and IFERROR

donjamin

New Member
Joined
Apr 27, 2011
Messages
49
Hello people,

I'm a bit of a newb when it comes to these formulas and was hoping someone could kindly help. I reckon it's probably something quite simple, so hopefully it's not too much to ask!

Basically, sheet 1 will have all of the data manually inputted, and will rely on sheet 2 (system data dump) to auto input corresponding data.

For instance:

On sheet 1, A2 will be a scanned barcode, and ideally B2 would automatically provide the company's product code related to that barcode (found on sheet 2). On Sheet 2 the scanned barcode would be found under column EW, and the corresponding product code under column AB. I will do a lot more with this sheet, but if someone could kindly provide this formula I think I could figure out the rest.

Thanks so much!
 
Last edited:
I just sat here and adjusted the red bit as that is what is being scanned, and thus searched for on Sheet 2.

=IFERROR(INDEX(Sheet2!$A$2:$FI$4,MATCH(Sheet1!$A$2,Sheet2!$EW$2:$EW$4,0),MATCH("RefNo",Sheet2!$A$1:$FI$1,0)),"")

for the first 100 cells. The table itself only has 712 rows.

Sorry edited as I selected wrong section.

If you keep it like that, the red reference will not change when you drag it down. If you want to be able to drag it down you either have to put it like this:

- Sheet1!$A2 (this will keep it from changing row)

or

- Sheet1!A2 (which will make it change if you drag it horizontally or vertically.

As for the table length, if it's always near 712 rows then you could put the marked part at
Sheet2!$A$2:$FI$750 and Sheet2!$EW$2:$EW$750 to be sure all records are included.
 
Upvote 0

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,214,923
Messages
6,122,289
Members
449,077
Latest member
Rkmenon

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