LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default Need Help in VLOOKUP (second attempt)

I have a question:
Here is what I want to happen. I am using UserForm/TextBoxes in transfer
Argument 1 and Argument 2 in a Row 2 Sheet 2. And then I need to use in
VLOOKUP fucntion, as Argument 1 should be as a LOOKUP_VALUE and Argument 2 as
TABLE_ARRAY. Both or arguments should be dynamic, i.e. the actual data is
tracked in other sheet in the same workbook.
I will try to make it more clear by following: I have already a UserForm
that copies
two variables from Sheet1 to position of A2 and B2 in Sheet2. In Sheet2, in
cell C3,
I need to place a VLOOKUP formula so it reads cell B2 as dynamic table_array.
Since the 1st UserForm every time executes CommandButton it copies different
value. For instance, it may come as "TOTAL_POPULATION" (this has to be an
table_array, pre-determined in Sheet3 and broke according to years) and the
second variable as "Cherokee, KS". The function has to find "Cherokee, KS" in
"TOTAL_POPULATION" table_array which is already in Sheet3 and return value
for 2000 year (that would be =VLOOKUP(A2, B2, 2, FALSE).
The reason I wanted to use UserForm, by inserting formula, it copies it as
and "B2" and not the
table_array. And there are about 20 table_arrays, so, that the 1st UserForm
is used, a user has an option of selecting any other than "TOTATL_POPULATION"
and so one. But it doesn't! I tried to use INDIRECT, but seems like it is
not what I need for my needs. CLEAN and TRIM commands were used in VBA for
(Trim(TextBox2.Text)) to make sure there are no blanks in
between. But somehow, I keep getting the "#N/A" error. Meanwhile, if I type
"TOTAL_POPULATION_FORECAST" table_array, it works perfect!
 
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
Sumproduct - Second Attempt Sandy Excel Worksheet Functions 4 August 10th 07 06:02 PM
Do until code attempt.. hachiroku[_3_] Excel Programming 2 May 20th 06 01:46 PM
my first attempt at R1C1 in vba [email protected] Excel Programming 4 September 5th 05 04:32 PM
1st attempt vba-how do i whatnext in this sub ALAN EMERY Excel Programming 1 July 27th 04 06:11 PM
2nd attempt at excel VB commands joel Excel Programming 9 May 10th 04 08:31 AM


All times are GMT +1. The time now is 09:13 AM.

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"