Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default VLOOKUP PROBLEM

I have a spreadsheet with various data in different sheets.
I have the following formula =vlookup(modelcode,C52,3) whereby cell C52
contains the name of the sheet to lookup the data. This name is not constant
as various sheet names, e.g. PRIVA, TACTI, CSMAF etc. contain the lookup
data. By using the above formula, it returns the #N/A error. If I substitue
the cell name with the actual sheet name in the formula. e.g. PRIVA, the
formula returns the correct answer. As the sheet name in cell C52 varies, is
it possible for the formula to pick the name of the lookup sheet from cell
C52, rather than me having to enter the actual sheet name every time.

Thanks in advance for any suggestions.

John
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default VLOOKUP PROBLEM

I don't follow you completely but here is how I see your issue. The second
argument of the VLookup function (where you have C52) takes a range of cells
(obviously C52 is a single cell not a range). What you want to do is to take
the value in Cell C52 which is the address for a range of Cells and use that
range in your formula. To do that you probably want to use the Indirect
function, which takes the address for a range of cells and returns the actual
range... So it would be something like this...

=vlookup(modelcode,indirect(C52),3)

--
HTH...

Jim Thomlinson


"John Davies" wrote:

I have a spreadsheet with various data in different sheets.
I have the following formula =vlookup(modelcode,C52,3) whereby cell C52
contains the name of the sheet to lookup the data. This name is not constant
as various sheet names, e.g. PRIVA, TACTI, CSMAF etc. contain the lookup
data. By using the above formula, it returns the #N/A error. If I substitue
the cell name with the actual sheet name in the formula. e.g. PRIVA, the
formula returns the correct answer. As the sheet name in cell C52 varies, is
it possible for the formula to pick the name of the lookup sheet from cell
C52, rather than me having to enter the actual sheet name every time.

Thanks in advance for any suggestions.

John

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
Another VLOOKUP Problem VivienW Excel Worksheet Functions 8 June 2nd 09 01:25 AM
VLOOKUP Problem brown_toby Excel Worksheet Functions 6 June 30th 06 04:52 PM
vlookup Problem marksuza Excel Discussion (Misc queries) 3 December 22nd 05 03:40 PM
Vlookup Problem Trying to excel in life but need help Excel Worksheet Functions 6 April 9th 05 08:45 PM
problem with vlookup Lolly[_2_] Excel Programming 2 October 1st 04 12:28 AM


All times are GMT +1. The time now is 09:16 PM.

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"