#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
TAK TAK is offline
external usenet poster
 
Posts: 3
Default vlookup

I have a value (M01) in my current worksheet in F3. I want to find that value
in another workbook, match on it and return the value in column 7 of that
worksheet. I have multiple sheets in the other workbook and I am currently
looking at each one individually. The formula I am using is:

=IF(ISERROR(VLOOKUP($F3,'[PAR.xls]E-M
10741003'!$B$17:$P$300,7,FALSE)),0,VLOOKUP($F3,'[PAR.xls]E-M
10741003'!$B$17:$P$300,7,FALSE))

The formula above just looks at workbook €śPAR.xls€ť and worksheet €śE-M
10741003€ť within that workbook. This works just fine one sheet at a time, but
when the job number changes, I have to change the worksheet name in my
formula. Is there a way I can look at all of the sheets, not just one at a
time or pull a variable (10741003) into the formula from another cell (B3) in
my current worksheet?

--
TAK
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default vlookup

If you wanted to lookup 3 sheets, then the general approach would be:

=IF(ISNA(vlookup_1),IF(ISNA(vlookup_2),IF(ISNA(vlo okup_3),"not
present",vlookup_3),vlookup_2),vlookup_1)

where vlookup_1 in your case might be:

VLOOKUP($F3,'[PAR.xls]E-M 10741003'!$B$17:$P$300,7,FALSE)

So, you can see that the formula will be quite unwieldly.

To access a sheet name from a cell, you will have to use the INDIRECT
function, but this will only work with open workbooks.

Hope this helps.

Pete
On May 14, 4:04*pm, TAK wrote:
I have a value (M01) in my current worksheet in F3. I want to find that value
in another workbook, match on it and return the value in column 7 of that
worksheet. I have multiple sheets in the other workbook and I am currently
looking at each one individually. The formula I am using is:

=IF(ISERROR(VLOOKUP($F3,'[PAR.xls]E-M
10741003'!$B$17:$P$300,7,FALSE)),0,VLOOKUP($F3,'[PAR.xls]E-M
10741003'!$B$17:$P$300,7,FALSE))

The formula above just looks at workbook “PAR.xls” and worksheet “E-M
10741003” within that workbook. This works just fine one sheet at a time, but
when the job number changes, I have to change the worksheet name in my
formula. Is there a way I can look at all of the sheets, not just one at a
time or pull a variable (10741003) into the formula from another cell (B3) in
my current worksheet?

--
TAK


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
TAK TAK is offline
external usenet poster
 
Posts: 3
Default vlookup

Thanks for the response, but unfortunately I have over 15 sheets in the other
workbook. I tried using the indirect function, but I am not that skilled and
could not get it to work.
--
TAK


"Pete_UK" wrote:

If you wanted to lookup 3 sheets, then the general approach would be:

=IF(ISNA(vlookup_1),IF(ISNA(vlookup_2),IF(ISNA(vlo okup_3),"not
present",vlookup_3),vlookup_2),vlookup_1)

where vlookup_1 in your case might be:

VLOOKUP($F3,'[PAR.xls]E-M 10741003'!$B$17:$P$300,7,FALSE)

So, you can see that the formula will be quite unwieldly.

To access a sheet name from a cell, you will have to use the INDIRECT
function, but this will only work with open workbooks.

Hope this helps.

Pete
On May 14, 4:04 pm, TAK wrote:
I have a value (M01) in my current worksheet in F3. I want to find that value
in another workbook, match on it and return the value in column 7 of that
worksheet. I have multiple sheets in the other workbook and I am currently
looking at each one individually. The formula I am using is:

=IF(ISERROR(VLOOKUP($F3,'[PAR.xls]E-M
10741003'!$B$17:$P$300,7,FALSE)),0,VLOOKUP($F3,'[PAR.xls]E-M
10741003'!$B$17:$P$300,7,FALSE))

The formula above just looks at workbook €śPAR.xls€ť and worksheet €śE-M
10741003€ť within that workbook. This works just fine one sheet at a time, but
when the job number changes, I have to change the worksheet name in my
formula. Is there a way I can look at all of the sheets, not just one at a
time or pull a variable (10741003) into the formula from another cell (B3) in
my current worksheet?

--
TAK



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default vlookup

If you were to put the sheet name:

E-M 10741003

in cell A1, for example, then your formula would be:

=VLOOKUP($F3,INDIRECT("'[PAR.xls]"&$A$1&"'!$B$17:$P$300"),7,FALSE)

Change the sheet name in A1 to lookup a different sheet with the same
formula.

NOTE - the file PAR.xls must be open for INDIRECT to work.

Hope this helps.

Pete

On May 14, 7:10*pm, TAK wrote:
Thanks for the response, but unfortunately I have over 15 sheets in the other
workbook. I tried using the indirect function, but I am not that skilled and
could not get it to work.
--
TAK



"Pete_UK" wrote:
If you wanted to lookup 3 sheets, then the general approach would be:


=IF(ISNA(vlookup_1),IF(ISNA(vlookup_2),IF(ISNA(vlo okup_3),"not
present",vlookup_3),vlookup_2),vlookup_1)


where vlookup_1 in your case might be:


VLOOKUP($F3,'[PAR.xls]E-M 10741003'!$B$17:$P$300,7,FALSE)


So, you can see that the formula will be quite unwieldly.


To access a sheet name from a cell, you will have to use the INDIRECT
function, but this will only work with open workbooks.


Hope this helps.


Pete
On May 14, 4:04 pm, TAK wrote:
I have a value (M01) in my current worksheet in F3. I want to find that value
in another workbook, match on it and return the value in column 7 of that
worksheet. I have multiple sheets in the other workbook and I am currently
looking at each one individually. The formula I am using is:


=IF(ISERROR(VLOOKUP($F3,'[PAR.xls]E-M
10741003'!$B$17:$P$300,7,FALSE)),0,VLOOKUP($F3,'[PAR.xls]E-M
10741003'!$B$17:$P$300,7,FALSE))


The formula above just looks at workbook “PAR.xls” and worksheet “E-M
10741003” within that workbook. This works just fine one sheet at a time, but
when the job number changes, I have to change the worksheet name in my
formula. Is there a way I can look at all of the sheets, not just one at a
time or pull a variable (10741003) into the formula from another cell (B3) in
my current worksheet?


--
TAK- Hide quoted text -


- Show quoted text -


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
TAK TAK is offline
external usenet poster
 
Posts: 3
Default vlookup

Pete,

Thanks a lot - that did it! Now that I see it, it makes sense. Have a great
day!
--
TAK


"Pete_UK" wrote:

If you were to put the sheet name:

E-M 10741003

in cell A1, for example, then your formula would be:

=VLOOKUP($F3,INDIRECT("'[PAR.xls]"&$A$1&"'!$B$17:$P$300"),7,FALSE)

Change the sheet name in A1 to lookup a different sheet with the same
formula.

NOTE - the file PAR.xls must be open for INDIRECT to work.

Hope this helps.

Pete

On May 14, 7:10 pm, TAK wrote:
Thanks for the response, but unfortunately I have over 15 sheets in the other
workbook. I tried using the indirect function, but I am not that skilled and
could not get it to work.
--
TAK



"Pete_UK" wrote:
If you wanted to lookup 3 sheets, then the general approach would be:


=IF(ISNA(vlookup_1),IF(ISNA(vlookup_2),IF(ISNA(vlo okup_3),"not
present",vlookup_3),vlookup_2),vlookup_1)


where vlookup_1 in your case might be:


VLOOKUP($F3,'[PAR.xls]E-M 10741003'!$B$17:$P$300,7,FALSE)


So, you can see that the formula will be quite unwieldly.


To access a sheet name from a cell, you will have to use the INDIRECT
function, but this will only work with open workbooks.


Hope this helps.


Pete
On May 14, 4:04 pm, TAK wrote:
I have a value (M01) in my current worksheet in F3. I want to find that value
in another workbook, match on it and return the value in column 7 of that
worksheet. I have multiple sheets in the other workbook and I am currently
looking at each one individually. The formula I am using is:


=IF(ISERROR(VLOOKUP($F3,'[PAR.xls]E-M
10741003'!$B$17:$P$300,7,FALSE)),0,VLOOKUP($F3,'[PAR.xls]E-M
10741003'!$B$17:$P$300,7,FALSE))


The formula above just looks at workbook €śPAR.xls€ť and worksheet €śE-M
10741003€ť within that workbook. This works just fine one sheet at a time, but
when the job number changes, I have to change the worksheet name in my
formula. Is there a way I can look at all of the sheets, not just one at a
time or pull a variable (10741003) into the formula from another cell (B3) in
my current worksheet?


--
TAK- Hide quoted text -


- Show quoted text -





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default vlookup

You're welcome, TAK - thanks for the feedback.

Incidentally, in order to avoid mis-typing the sheet name in A1, you
can set this up as a drop-down, so you can just choose from a (pre-
defined) list.

Pete

On May 15, 4:12*pm, TAK wrote:
Pete,

Thanks a lot - that did it! Now that I see it, it makes sense. Have a great
day!
--
TAK



"Pete_UK" wrote:
If you were to put the sheet name:


E-M 10741003


in cell A1, for example, then your formula would be:


=VLOOKUP($F3,INDIRECT("'[PAR.xls]"&$A$1&"'!$B$17:$P$300"),7,FALSE)


Change the sheet name in A1 to lookup a different sheet with the same
formula.


NOTE - the file PAR.xls must be open for INDIRECT to work.


Hope this helps.


Pete


On May 14, 7:10 pm, TAK wrote:
Thanks for the response, but unfortunately I have over 15 sheets in the other
workbook. I tried using the indirect function, but I am not that skilled and
could not get it to work.
--
TAK


"Pete_UK" wrote:
If you wanted to lookup 3 sheets, then the general approach would be:


=IF(ISNA(vlookup_1),IF(ISNA(vlookup_2),IF(ISNA(vlo okup_3),"not
present",vlookup_3),vlookup_2),vlookup_1)


where vlookup_1 in your case might be:


VLOOKUP($F3,'[PAR.xls]E-M 10741003'!$B$17:$P$300,7,FALSE)


So, you can see that the formula will be quite unwieldly.


To access a sheet name from a cell, you will have to use the INDIRECT
function, but this will only work with open workbooks.


Hope this helps.


Pete
On May 14, 4:04 pm, TAK wrote:
I have a value (M01) in my current worksheet in F3. I want to find that value
in another workbook, match on it and return the value in column 7 of that
worksheet. I have multiple sheets in the other workbook and I am currently
looking at each one individually. The formula I am using is:


=IF(ISERROR(VLOOKUP($F3,'[PAR.xls]E-M
10741003'!$B$17:$P$300,7,FALSE)),0,VLOOKUP($F3,'[PAR.xls]E-M
10741003'!$B$17:$P$300,7,FALSE))


The formula above just looks at workbook “PAR.xls” and worksheet “E-M
10741003” within that workbook. This works just fine one sheet at a time, but
when the job number changes, I have to change the worksheet name in my
formula. Is there a way I can look at all of the sheets, not just one at a
time or pull a variable (10741003) into the formula from another cell (B3) in
my current worksheet?


--
TAK- Hide quoted text -


- Show quoted text -- Hide quoted text -


- Show quoted text -


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
TB TB is offline
external usenet poster
 
Posts: 26
Default vlookup

Pet,

I saw this post and trying to do something similar. I want to match B2 on
one worksheet, to 4 other worksheets. I can do it for one which I used

=IF(ISERROR(VLOOKUP(B2,LM_RETENTION_CLAIMS!A$2:A$6 500, 1, FALSE)), "not
found", "found")

That works, but I need it to work on three other worksheets as well. Is
there a way i can add the other to that formula so it searches for the info
on all of the worksheets?

Thanks

TB


"Pete_UK" wrote:

If you wanted to lookup 3 sheets, then the general approach would be:

=IF(ISNA(vlookup_1),IF(ISNA(vlookup_2),IF(ISNA(vlo okup_3),"not
present",vlookup_3),vlookup_2),vlookup_1)

where vlookup_1 in your case might be:

VLOOKUP($F3,'[PAR.xls]E-M 10741003'!$B$17:$P$300,7,FALSE)

So, you can see that the formula will be quite unwieldly.

To access a sheet name from a cell, you will have to use the INDIRECT
function, but this will only work with open workbooks.

Hope this helps.

Pete
On May 14, 4:04 pm, TAK wrote:
I have a value (M01) in my current worksheet in F3. I want to find that value
in another workbook, match on it and return the value in column 7 of that
worksheet. I have multiple sheets in the other workbook and I am currently
looking at each one individually. The formula I am using is:

=IF(ISERROR(VLOOKUP($F3,'[PAR.xls]E-M
10741003'!$B$17:$P$300,7,FALSE)),0,VLOOKUP($F3,'[PAR.xls]E-M
10741003'!$B$17:$P$300,7,FALSE))

The formula above just looks at workbook €śPAR.xls€ť and worksheet €śE-M
10741003€ť within that workbook. This works just fine one sheet at a time, but
when the job number changes, I have to change the worksheet name in my
formula. Is there a way I can look at all of the sheets, not just one at a
time or pull a variable (10741003) into the formula from another cell (B3) in
my current worksheet?

--
TAK



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default vlookup

One way:

=IF(SUM(COUNTIF(Sheet1!A2:A6500,B2),COUNTIF(Sheet2 !A2:A6500,B2),COUNTIF(Sheet3!A2:A6500,B2),COUNTIF( Sheet4!A2:A6500,B2)),"Found","Not
Found")

--
Biff
Microsoft Excel MVP


"TB" wrote in message
...
Pet,

I saw this post and trying to do something similar. I want to match B2 on
one worksheet, to 4 other worksheets. I can do it for one which I used

=IF(ISERROR(VLOOKUP(B2,LM_RETENTION_CLAIMS!A$2:A$6 500, 1, FALSE)), "not
found", "found")

That works, but I need it to work on three other worksheets as well. Is
there a way i can add the other to that formula so it searches for the
info
on all of the worksheets?

Thanks

TB


"Pete_UK" wrote:

If you wanted to lookup 3 sheets, then the general approach would be:

=IF(ISNA(vlookup_1),IF(ISNA(vlookup_2),IF(ISNA(vlo okup_3),"not
present",vlookup_3),vlookup_2),vlookup_1)

where vlookup_1 in your case might be:

VLOOKUP($F3,'[PAR.xls]E-M 10741003'!$B$17:$P$300,7,FALSE)

So, you can see that the formula will be quite unwieldly.

To access a sheet name from a cell, you will have to use the INDIRECT
function, but this will only work with open workbooks.

Hope this helps.

Pete
On May 14, 4:04 pm, TAK wrote:
I have a value (M01) in my current worksheet in F3. I want to find that
value
in another workbook, match on it and return the value in column 7 of
that
worksheet. I have multiple sheets in the other workbook and I am
currently
looking at each one individually. The formula I am using is:

=IF(ISERROR(VLOOKUP($F3,'[PAR.xls]E-M
10741003'!$B$17:$P$300,7,FALSE)),0,VLOOKUP($F3,'[PAR.xls]E-M
10741003'!$B$17:$P$300,7,FALSE))

The formula above just looks at workbook "PAR.xls" and worksheet "E-M
10741003" within that workbook. This works just fine one sheet at a
time, but
when the job number changes, I have to change the worksheet name in my
formula. Is there a way I can look at all of the sheets, not just one
at a
time or pull a variable (10741003) into the formula from another cell
(B3) in
my current worksheet?

--
TAK





  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default vlookup

As you are not bringing back any data you can use the MATCH function,
like this:

=IF(ISNA(MATCH(B2,LM_RETENTION_CLAIMS!A$2:A
$6500,0)),IF(ISNA(MATCH(B2,Sheet2!A$2:A
$6500,0)),IF(ISNA(MATCH(B2,Sheet3!A$2:A
$6500,0)),IF(ISNA(MATCH(B2,Sheet4!A$2:A$6500,0))," not
found","found_4"),"found_3"),"found_2"),found_1")

This is all one formula. I've assumed the same lookup range in all
sheets, and used Sheet2, Sheet3 etc for the other sheet names - adjust
to suit your set up. I thought you might like to know which sheet the
value was found in, so I numbered the return, but you can make this
what you want.

The following shows the formula more logically:

=IF(ISNA(MATCH(B2,LM_RETENTION_CLAIMS!A$2:A$6500,0 )),
IF(ISNA(MATCH(B2,Sheet2!A$2:A$6500,0)),
IF(ISNA(MATCH(B2,Sheet3!A$2:A$6500,0)),
IF(ISNA(MATCH(B2,Sheet4!A$2:A$6500,0)),
"not found",
"found_4"),
"found_3"),
"found_2"),
found_1")

You can, of course, use VLOOKUP instead of MATCH if you wish.

Hope this helps.

Pete



On May 20, 9:52*pm, TB wrote:
Pet,

I saw this post and trying to do something similar. *I want to match B2 on
one worksheet, to 4 other worksheets. *I can do it for one which I used

=IF(ISERROR(VLOOKUP(B2,LM_RETENTION_CLAIMS!A$2:A$6 500, 1, FALSE)), "not
found", "found")

That works, but I need it to work on three other worksheets as well. *Is
there a way i can add the other to that formula so it searches for the info
on all of the worksheets?

Thanks

TB

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vlookup in vlookup - taking the result as array name SupperDuck Excel Worksheet Functions 2 June 2nd 07 11:05 AM
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP buffgirl71 Excel Discussion (Misc queries) 12 November 14th 06 11:36 PM
Vlookup -=VLOOKUP(F9,LookUp1!$A$2:$B$1504,2,FALSE) MikeR-Oz New Users to Excel 1 March 22nd 06 09:01 AM
IF(AND(val1=VLOOKUP( );val2>=VLOOKUP( );val2<=VLOOKUP( );VLOOKUP( Oso Excel Worksheet Functions 2 January 26th 05 06:56 AM
Vlookup info being used without vlookup table attached? Excel Worksheet Functions 0 January 25th 05 10:43 AM


All times are GMT +1. The time now is 06:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"