LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default User defined range for vlookup w/ loop

Okay I'm trying to set a user defined range to use in VLOOKUP. Basically the
range will be changing frequently, and user needs will vary so I figured the
best way will be to have them choose what data they want to pull.

So I'd like the user to select the range, then to have that range used
in the vlookup formula that's already stored in a cell, E3.

Once that vlookup range is set, to let's say A1:B10 by the user, we need to
have a loop run that will increment the target cell each time. example:

-the formula in cell E3 would be "=VLOOKUP(C$10$,UserRange,5,False)"
-at this point i have additional code that will run to do other stuff; but
once it's done, I'd like the loop to start over so that target cell used in
VLOOKUP (C10) will need to increase by +1 until the last row in UserRange is
reached...so if currently
cell C10 (the target cell in E3) reads:

=July!A10 'the loop would add to the cell address each time by 1. So:
=July!A11
=July!A12
=July!A13

Until it reaches the end of the Vlookup range.

Sorry if that was confusing--but any help would be appreciated!
 
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
User Defined Function and VLookUP Kevin Excel Worksheet Functions 11 October 26th 09 02:10 AM
For Each Loop skip using user-defined type? [email protected] Excel Programming 0 November 20th 06 09:08 PM
Loop through a User-Defined Type? uf_gator Excel Programming 2 February 21st 06 06:57 PM
How to: User Form to assign a user defined range to a macro variab TrevTrav Excel Programming 1 March 22nd 05 07:57 PM
Vlookup in user defined function Tim Svensson Excel Programming 1 January 13th 04 10:19 AM


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