Thread: vlookup
View Single Post
  #2   Report Post  
Domenic
 
Posts: n/a
Default

Try...

=VLOOKUP(A1,INDIRECT("'"&INDEX({"Sheet1","Sheet2"} ,MATCH(TRUE,COUNTIF(IND
IRECT("'"&{"Sheet1","Sheet2"}&"'!A2:A4"),A1)0,0)) &"'!A2:B4"),2,0)

OR

=VLOOKUP(A1,INDIRECT("'"&INDEX(B1:B2,MATCH(TRUE,CO UNTIF(INDIRECT("'"&B1:B
2&"'!A2:A4"),A1)0,0))&"'!A2:B4"),2,0)

....confirmed with CONTROL+SHIFT+ENTER, where A1 contains the salesman of
interest, and B1:B2 contains your sheet names. Adjust the ranges
accordingly.

Hope this helps!

In article ,
"TPratt" wrote:

Is there a way to use a vlookup to look across multiple tabs within an excel
file?

Example
Tab 1 contains sales data from salesmen in State A

Salesman Sales
1 100
2 200
3 500

Tab 2 contains sales data from salesmen in State B

Salesman Sales
5 1000
6 600
7 800

From another tab, I would like to be able to type in a salesman's number and
get their sales, regardless of which tab they're on, without having to first
combine the data onto one sheet.

* The data is in the exact same place on each tab. (ie. Salesman 1 and
Salesman 5 are each in Cell A2 on their respective tabs)