Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Dan
 
Posts: n/a
Default use a cell to reference a range in a vlookup

I have a spreadsheet that has the same line on it, and would like to automate
a vlookup so that i do not have to change the tab name. I have the tab names
in a column already, before that cell I was making the range with a formula
so that I coudl reference that cell to define my range. That does not seem
to be working, does anyone know how to work around that? Example below

Formula that works
=VLOOKUP("a",Sheet2!1:65536,2,FALSE)

Formula that does not work
A1 = Sheet2!1:65536
=VLOOKUP("a",A1,2,FALSE)
  #2   Report Post  
bj
 
Posts: n/a
Default

try
=VLOOKUP("a",indirect(A1),2,FALSE)

"Dan" wrote:

I have a spreadsheet that has the same line on it, and would like to automate
a vlookup so that i do not have to change the tab name. I have the tab names
in a column already, before that cell I was making the range with a formula
so that I coudl reference that cell to define my range. That does not seem
to be working, does anyone know how to work around that? Example below

Formula that works
=VLOOKUP("a",Sheet2!1:65536,2,FALSE)

Formula that does not work
A1 = Sheet2!1:65536
=VLOOKUP("a",A1,2,FALSE)

  #3   Report Post  
JE McGimpsey
 
Posts: n/a
Default

You could use

=VLOOKUP("a",INDIRECT(A1),2,FALSE)

but I wonder why you're using another cell to contain range references.
There are probably better ways to identify the ranges you want.




In article ,
Dan wrote:

I have a spreadsheet that has the same line on it, and would like to automate
a vlookup so that i do not have to change the tab name. I have the tab names
in a column already, before that cell I was making the range with a formula
so that I coudl reference that cell to define my range. That does not seem
to be working, does anyone know how to work around that? Example below

Formula that works
=VLOOKUP("a",Sheet2!1:65536,2,FALSE)

Formula that does not work
A1 = Sheet2!1:65536
=VLOOKUP("a",A1,2,FALSE)

  #4   Report Post  
Dan
 
Posts: n/a
Default

I have 60 sheets, all in the same format. I want to make a summary sheet for
the same line on all the sheets. So I want to use a vlookup to give me the
specific row that i want, and I wanted the cell to give me the sheet name.

The indirect did not work, because they are on different sheets I think.

"JE McGimpsey" wrote:

You could use

=VLOOKUP("a",INDIRECT(A1),2,FALSE)

but I wonder why you're using another cell to contain range references.
There are probably better ways to identify the ranges you want.




In article ,
Dan wrote:

I have a spreadsheet that has the same line on it, and would like to automate
a vlookup so that i do not have to change the tab name. I have the tab names
in a column already, before that cell I was making the range with a formula
so that I coudl reference that cell to define my range. That does not seem
to be working, does anyone know how to work around that? Example below

Formula that works
=VLOOKUP("a",Sheet2!1:65536,2,FALSE)

Formula that does not work
A1 = Sheet2!1:65536
=VLOOKUP("a",A1,2,FALSE)


  #5   Report Post  
bj
 
Posts: n/a
Default

try changing A1 to
=Sheet2!A1
and use
=VLOOKUP("a",offset(indirect(A1),0,0,65636,2),2,FA LSE)


"Dan" wrote:

I have 60 sheets, all in the same format. I want to make a summary sheet for
the same line on all the sheets. So I want to use a vlookup to give me the
specific row that i want, and I wanted the cell to give me the sheet name.

The indirect did not work, because they are on different sheets I think.

"JE McGimpsey" wrote:

You could use

=VLOOKUP("a",INDIRECT(A1),2,FALSE)

but I wonder why you're using another cell to contain range references.
There are probably better ways to identify the ranges you want.




In article ,
Dan wrote:

I have a spreadsheet that has the same line on it, and would like to automate
a vlookup so that i do not have to change the tab name. I have the tab names
in a column already, before that cell I was making the range with a formula
so that I coudl reference that cell to define my range. That does not seem
to be working, does anyone know how to work around that? Example below

Formula that works
=VLOOKUP("a",Sheet2!1:65536,2,FALSE)

Formula that does not work
A1 = Sheet2!1:65536
=VLOOKUP("a",A1,2,FALSE)


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
Offset Function works in cell, not in named range DragonslayerApps Excel Worksheet Functions 0 July 25th 05 04:39 PM
macro help thephoenix12 Excel Discussion (Misc queries) 4 July 15th 05 05:57 PM
How to dynamically reference a dynamic named range paris3 Excel Worksheet Functions 4 June 24th 05 01:22 AM
How do I refer a Range to a Cell Mal Excel Worksheet Functions 6 June 7th 05 08:47 AM
Adding contents of one cell to a range of cells. CLJinVA Excel Worksheet Functions 1 February 10th 05 10:19 PM


All times are GMT +1. The time now is 05:29 PM.

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

About Us

"It's about Microsoft Excel"