Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Patrick
 
Posts: n/a
Default vlookup and a function field input

Hey!

I am using a function to determine the name of the worksheet and place it
into a cell:

=MID(CELL("filename"),SEARCH("]",CELL("filename"))+1,6)

I then want to use the output of this cell [the first one is 1001] to feed
into a vlookup:

=VLOOKUP($K$2,List!$I$2:$K$579,2,FALSE)

This works when I type 1001 into cell K2 but does not work when I use the
first function to generate 1001 in cell K2. Both are formatted as
number|general.

I've tried several things - and the only thing that works in the vlookup
function is if I physically type the sheet name [a number] into cell K2.

Help? I must have missed something obvious.

Thank you!

Patrick

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default vlookup and a function field input

1. That function is not correct, you would need to specify any cell
reference or it will return wrong sheet name.

2. The result is text so you need to force it to be a number if the table
has a numeric value

=--MID(CELL("filename",A1),SEARCH("]",CELL("filename",A1))+1,6)

should suffice


--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com


"Patrick" wrote in message
...
Hey!

I am using a function to determine the name of the worksheet and place it
into a cell:

=MID(CELL("filename"),SEARCH("]",CELL("filename"))+1,6)

I then want to use the output of this cell [the first one is 1001] to feed
into a vlookup:

=VLOOKUP($K$2,List!$I$2:$K$579,2,FALSE)

This works when I type 1001 into cell K2 but does not work when I use the
first function to generate 1001 in cell K2. Both are formatted as
number|general.

I've tried several things - and the only thing that works in the vlookup
function is if I physically type the sheet name [a number] into cell K2.

Help? I must have missed something obvious.

Thank you!

Patrick



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Patrick
 
Posts: n/a
Default vlookup and a function field input

Thank you!!

The function works without a cell reference, but I understand the why it
"should" be there.

As for producing a number that vlookup can use - your solution works
perfectly!

Thank you!

"Peo Sjoblom" wrote:

1. That function is not correct, you would need to specify any cell
reference or it will return wrong sheet name.

2. The result is text so you need to force it to be a number if the table
has a numeric value

=--MID(CELL("filename",A1),SEARCH("]",CELL("filename",A1))+1,6)

should suffice


--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com


"Patrick" wrote in message
...
Hey!

I am using a function to determine the name of the worksheet and place it
into a cell:

=MID(CELL("filename"),SEARCH("]",CELL("filename"))+1,6)

I then want to use the output of this cell [the first one is 1001] to feed
into a vlookup:

=VLOOKUP($K$2,List!$I$2:$K$579,2,FALSE)

This works when I type 1001 into cell K2 but does not work when I use the
first function to generate 1001 in cell K2. Both are formatted as
number|general.

I've tried several things - and the only thing that works in the vlookup
function is if I physically type the sheet name [a number] into cell K2.

Help? I must have missed something obvious.

Thank you!

Patrick




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 not recognizing field goeppngr Excel Worksheet Functions 3 January 27th 06 09:15 PM
VLOOKUP Function Chris Manning Excel Discussion (Misc queries) 2 June 2nd 05 10:26 PM
How do I access data stored in a SQL server for vlookup function? M.Heer Excel Worksheet Functions 8 May 12th 05 09:51 PM
VLOOKUP Function using Data Ranges. Cal Excel Worksheet Functions 6 April 16th 05 03:26 PM
Array Function with VLOOKUP CoRrRan Excel Worksheet Functions 15 April 8th 05 05:54 PM


All times are GMT +1. The time now is 07:11 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"