![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Location: Plano, Texas
Posts: 29
|
Can you specify in a Vlookup to being the lookup where the last on left off?
For example, I have a Vlookup the goes down 200 rows and it is looking in a table that contains 5000 rows. Can I specify for the lookup to continue looking from the last record where it found a match, or does it have to begin the lookup at the top of the table? Any info will be appreciated. |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Apr 2002
Location: Sarasota, FL
Posts: 1,539
|
You could put a label at the end of each row that corresponds to the row address. When your VLookup retrieves the data you want, have it also pull that label. You could then have in your Vlookup command a variable for your range instead of an explicit range, with the value of the variable being set from the returned value of yur initial lookup. Hope that helps.
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Apr 2002
Location: Redmond, WA
Posts: 636
|
Larry,
You can do what you are describing. However, you can't do it very easily (if at all) with a vlookup. I would suggest doing an if type statement. |
|
|
|
|
|
#4 |
|
New Member
Join Date: Apr 2002
Location: Plano, Texas
Posts: 29
|
Corticus,
Could you possibly show some of the logic for this? I am a newbie and I'm not sure I could translate what you said into a functional formula. Thanks again, |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Apr 2002
Location: Redmond, WA
Posts: 636
|
Try something like that. I did mine on a small range, and it seemed to work ok. Let me know if you have any questions.
=VLOOKUP(B1, INDIRECT("a"&MATCH(B1,A1:A10,0)&":a10"),1,0) |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|