Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 36
Default VLookup Range Help

I would like to have the "Range" portion of the VLOOKUP command be populated
from a user input. Is this possible?

Ex: A2 has the formula VLOOKUP(1,A4:C12,1,TRUE) works. Instead, I would
like for cell A1 to have the value: "A4:C12" and the formula in A2 to be
VLOOKUP(1,A1,1,TRUE). I would like to avoid macros.

Thanks in advance.

-Chris
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 109
Default VLookup Range Help

Chris

Try something like:

=VLOOKUP(1,INDIRECT(A1),1,TRUE)

with the range of interest in cell A1, e.g. A4:C12.

Good luck.

Ken
Norfolk, Va


On Jun 8, 10:57 am, CWillis wrote:
I would like to have the "Range" portion of the VLOOKUP command be populated
from a user input. Is this possible?

Ex: A2 has the formula VLOOKUP(1,A4:C12,1,TRUE) works. Instead, I would
like for cell A1 to have the value: "A4:C12" and the formula in A2 to be
VLOOKUP(1,A1,1,TRUE). I would like to avoid macros.

Thanks in advance.

-Chris



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default VLookup Range Help

One way:

A2: =VLOOKUP(1, INDIRECT(A1),1, TRUE)

In article ,
CWillis wrote:

I would like to have the "Range" portion of the VLOOKUP command be populated
from a user input. Is this possible?

Ex: A2 has the formula VLOOKUP(1,A4:C12,1,TRUE) works. Instead, I would
like for cell A1 to have the value: "A4:C12" and the formula in A2 to be
VLOOKUP(1,A1,1,TRUE). I would like to avoid macros.

Thanks in advance.

-Chris

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 36
Default VLookup Range Help

Thanks Ken. It works great for my example, but I should have made my example
closer to my actual problem. Lets move cell A1 to a different sheet. The
value of A1 also references a range in a completely different workbook. I
can't get INDIRECT to accept this. Thanks again.

" wrote:

Chris

Try something like:

=VLOOKUP(1,INDIRECT(A1),1,TRUE)

with the range of interest in cell A1, e.g. A4:C12.

Good luck.

Ken
Norfolk, Va


On Jun 8, 10:57 am, CWillis wrote:
I would like to have the "Range" portion of the VLOOKUP command be populated
from a user input. Is this possible?

Ex: A2 has the formula VLOOKUP(1,A4:C12,1,TRUE) works. Instead, I would
like for cell A1 to have the value: "A4:C12" and the formula in A2 to be
VLOOKUP(1,A1,1,TRUE). I would like to avoid macros.

Thanks in advance.

-Chris




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 109
Default VLookup Range Help

Chris

The same methodology still works for me when I have:

=VLOOKUP(B1,INDIRECT(Sheet2!A1),1,FALSE)

in cell C1 on sheet1 of Book1

and

[Book2]Sheet1!$A$1:$A$10

in A1 of sheet2 of Book1

and my lookup range on Sheet1 of Book2.

Ken





On Jun 8, 11:21 am, JE McGimpsey wrote:
One way:

A2: =VLOOKUP(1, INDIRECT(A1),1, TRUE)

In article ,



CWillis wrote:
I would like to have the "Range" portion of the VLOOKUP command be populated
from a user input. Is this possible?


Ex: A2 has the formula VLOOKUP(1,A4:C12,1,TRUE) works. Instead, I would
like for cell A1 to have the value: "A4:C12" and the formula in A2 to be
VLOOKUP(1,A1,1,TRUE). I would like to avoid macros.


Thanks in advance.


-Chris- Hide quoted text -


- Show quoted text -





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 36
Default VLookup Range Help

Ken,
That works for me too as long as Book 2 is open. If I close Book 2 and
replace A1 with the full path name to Book 2 (C:\Book 2) then it gives a
#REF!. Any ideas?
-Chris

" wrote:

Chris

The same methodology still works for me when I have:

=VLOOKUP(B1,INDIRECT(Sheet2!A1),1,FALSE)

in cell C1 on sheet1 of Book1

and

[Book2]Sheet1!$A$1:$A$10

in A1 of sheet2 of Book1

and my lookup range on Sheet1 of Book2.

Ken





On Jun 8, 11:21 am, JE McGimpsey wrote:
One way:

A2: =VLOOKUP(1, INDIRECT(A1),1, TRUE)

In article ,



CWillis wrote:
I would like to have the "Range" portion of the VLOOKUP command be populated
from a user input. Is this possible?


Ex: A2 has the formula VLOOKUP(1,A4:C12,1,TRUE) works. Instead, I would
like for cell A1 to have the value: "A4:C12" and the formula in A2 to be
VLOOKUP(1,A1,1,TRUE). I would like to avoid macros.


Thanks in advance.


-Chris- Hide quoted text -


- Show quoted text -




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 36
Default VLookup Range Help

I should have read the help file better for the INDIRECT command. The file
has to be open. I guess I will be writing a macro. Thanks again.

" wrote:

Chris

The same methodology still works for me when I have:

=VLOOKUP(B1,INDIRECT(Sheet2!A1),1,FALSE)

in cell C1 on sheet1 of Book1

and

[Book2]Sheet1!$A$1:$A$10

in A1 of sheet2 of Book1

and my lookup range on Sheet1 of Book2.

Ken





On Jun 8, 11:21 am, JE McGimpsey wrote:
One way:

A2: =VLOOKUP(1, INDIRECT(A1),1, TRUE)

In article ,



CWillis wrote:
I would like to have the "Range" portion of the VLOOKUP command be populated
from a user input. Is this possible?


Ex: A2 has the formula VLOOKUP(1,A4:C12,1,TRUE) works. Instead, I would
like for cell A1 to have the value: "A4:C12" and the formula in A2 to be
VLOOKUP(1,A1,1,TRUE). I would like to avoid macros.


Thanks in advance.


-Chris- Hide quoted text -


- Show quoted text -




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
using vlookup for a range of cells mmpfa07 Excel Worksheet Functions 2 May 4th 07 11:25 PM
vlookup range changes Hobbes2006 Excel Worksheet Functions 3 April 18th 06 07:07 PM
Vlookup where range changes Greg Excel Worksheet Functions 1 March 17th 06 11:41 PM
Vlookup for range, help dark_snowboy Excel Worksheet Functions 3 January 20th 06 06:19 PM
Vlookup - Range Mark Excel Discussion (Misc queries) 1 April 15th 05 05:52 PM


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