Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 621
Default Select Previously Selected worksheet (and/or select previously selected workbook)

Please note correction..............drop the double quotes.

=VLOOKUP(A1,INDIRECT("F1"),2,FALSE) should be


=VLOOKUP(A1,INDIRECT(F1),2,FALSE)


Gord


On Fri, 10 Dec 2010 12:03:52 -0800, Gord Dibben wrote:

Here's a vlookup formula you could use to collect data from book2sheet2 columns
A and B to B1 of book1sheet1

Assuming both workbooks are open.

=VLOOKUP(A1,[Book2.xls]Sheet2'!$A$1:$B$1000,FALSE)

In your automating scenario what would be the variables?

Lookup value cell....................assume relative reference in same column?

Table range............same A:B in different books and different sheets?

Variables in that case would be book name and sheet name which would have to be
determined in some manner................input by user or?

Column index number..............2 in every table?

Fill down to where? Surely not the entire column.

I'm thinking of maybe INDIRECT function and range names

=VLOOKUP(A1,INDIRECT("F1"),2,FALSE) where F1 holds a range name input by user.


Gord


On Fri, 10 Dec 2010 11:00:19 -0800 (PST), Dave K wrote:

Thanks Gord. I do so many of these every day that it will save me some
time to create a vlookup shortcut. Additionally, i am looking at ways
of simplifying the process for other end users.

My thoughts were to manually place the associated vlookup columns in A
and B of each worksheet, and then to use a shortcut combination to
"automate" the use of the function, including automatically filling
the entire column with the formula.

On Dec 10, 11:30*am, Gord Dibben wrote:
Quite difficult to use VLOOKUP without specifying a lookup value and lookup
table.

Can you explain what you mean by "auto-select"?

Normally one would type * =VLOOKUP(value, * * *then switch to source sheet,
select the table, type any arguments, add a closing parens then hit ENTER key.

What part of this needs automating?

Can you explain what you mean by "automatically do a vlookup between two data
lists in two sheets with a single step"?

Gord Dibben * * MS Excel MVP



On Fri, 10 Dec 2010 08:31:00 -0800 (PST), Dave K wrote:
Is anyone aware of VBA code that would allow me to auto-select the
previously active worksheet (within a particular workbook....or within
another open workbook)?

In essence, I am trying to build a routine that will allow me to
automatically do a vlookup between two data lists in two sheets with a
single step, rather than go through the process of specifying the
particular columns

Thanks for any suggestions.

FYI, i am using Excel 2003.- 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
Help with sebastienm's code - Returning To Previously Selected Worksheet AcesUp Excel Programming 0 June 4th 06 10:44 AM
Select last worksheet in workbook TimT Excel Programming 6 October 11th 05 09:22 PM
In Excel 2000, How do you select the whole of a worksheet (Select. Rascal Excel Discussion (Misc queries) 1 March 5th 05 12:03 AM
In Excel 2000, How do you select the whole of a worksheet (Select. Rascal Excel Discussion (Misc queries) 1 March 4th 05 11:59 PM
Select other workbook to select data in a macro. T Tromp Excel Programming 2 September 19th 03 01:43 PM


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