View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Steve K Steve K is offline
external usenet poster
 
Posts: 8
Default Excel Formula Functions

I use a simple woksheet and ask the user to provide a lookup value
Lookup value=25 (cell=A1)
and a region (that corresponds to a a data range on a tab in the workbook.
Region=met1sur1 (cell=A2)
and miles
Miles=100 (cell=A3)
As I get the user input, I build the formula:

When the user enters the region name (met1sur1), I need to enter the literal
into the Vlookup so the formula knows what sheet the data table resides. So
it would look something like this:

=Vlookup(A1,A2!dataRange,A3)

In order to get the formula to evaluate, I need the correct syntax (quotes
and double quotes to enter the value entered in cell A2 (met1sur1).

=Vlookup(25,"'"&met1sur1!dataRange"'",100)

Thanks

"Don Guillett" wrote:

With a formula or a macro?
How do you get the info from the user.
Show us your efforts so far.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Steve K" wrote in message
...
Can someone give me the correct syntax for building a Lookup () formula.

The user will give me sheet name (i.e. Sheet1) and I want to use that
value
to build the formula. What is the correct way to use Sheet1 to build the
formula. Specifically, where do the quotes and double quotes go to build
teh
User Entered Value for teh Sheet and Range Name?

=Vlookup(23, User Entered Value Here for worksheet and Range Name, 3)