Vlookup from multiple tabs at same time

G MJ

New Member
Joined
Dec 16, 2021
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hi,

I'm hoping someone can help with a problem I've encountered.

I have a worksheet with a summary tab followed by a separate tab for each year which are all formatted and set up in the same way. On the summary tab I have a very simple VLOOKUP formula looking at the date an invoice was created.

As each new year tab was created I added an iserror and added another VLOOKUP eg IF(ISERROR(VLOOKUP(A2,'Sales 2022'!a:b,2,0)),VLOOKUP(A2,'Sales 2023'!a:b,2,0),VLOOKUP(A2,'Sales 2022'!a:b,2,0))

This worked once but now we have a few years added it is no longer feasible.

What I'm hoping to achieve is some sort of vlookup which looked at multiple tabs at once eg vlookup(a2,'Sales 2022:Sales2023'!$a:$b,2,0). So if it doesn't find in tab 2021, look in 2022 if not look in 2023 and so on.

For an example each tab is set up
SELLER SIP INVOICESIP INVOICE DATESELLER INVOICE
INV-00127/09/2022
INV-00413/10/2022
INV-00619/11/2022

I'm sure there is something that exists for this but my knowledge is fairly limited. Thanks.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
How about
Excel Formula:
=vlookup(a2,vstack('Sales 2022:Sales2023'!$a2:$b1000),2,0)
You need to limit the range rather than using entire columns.
 
Upvote 0
Solution
Perfect. Thank you. That works great.

That quick for something I've spent hours on.

Thanks again.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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