# Lookup Formula Question

#### floggingmolly

##### Board Regular
I have a workbook with 2 sheets. On Sheet1 I have in column G a list of Station Numbers. On Sheet 2 I have Station #'s in Column A and Column B, then in E there is a due date. I am trying to figure out a formula that will look for a certain # on sheet 2 in column A and B, then return the date in column E. Not sure if that makes sense. For Example: On Sheet 1 in column G I have station #200. On Sheet 2 that # might be in Column A or B depending on their location, so I need to somehow do a lookup in A and B to find #200, then give me the corresponding date from column E. If anyone could help it would be greatly appreciated. I have been trying for 3 days and can't get it to work.

### Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

#### etaf

##### Well-known Member
could the number be in both a and b
you could use a vlookup() with an iferror()

iferror(vlookup(lookup in A), vlookup(lookup in b))

#### floggingmolly

##### Board Regular
could the number be in both a and b
you could use a vlookup() with an iferror()

iferror(vlookup(lookup in A), vlookup(lookup in b))
That worked perfect. Thank you so much. Is it still possible to hide N/A if the # is in neither column? I tried doing the "" in the formulas but didnt seem to work

#### etaf

##### Well-known Member
i think embedding another iferror
iferror(vlookup(lookup in A), iferror(vlookup(lookup in b),""))

#### floggingmolly

##### Board Regular
i think embedding another iferror
iferror(vlookup(lookup in A), iferror(vlookup(lookup in b),""))
That did the trick. Thank you so much for your help. Much appreciated.

you are welcome

Replies
33
Views
383
Replies
10
Views
92
Replies
5
Views
188
Replies
1
Views
131
Replies
2
Views
189

1,126,972
Messages
5,621,908
Members
415,865
Latest member
pxmike

### 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.

### Which adblocker are you using?

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

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