How To Write a Vlookup where the data array changes each time the v lookup is used

AnnaL96

New Member
Joined
Oct 29, 2012
Messages
8
Hi All :)
I'm trying to do a Vlookup on a file that gets automatically downloaded to the computer from a website. The data is in lots of different data sets, like so:
Loans to countries
Mar
Apr
May
Jun

Loans to banks
Mar
Apr
May
Jun

Every month a new row of data gets added to each table, meaning the start and end cells of the array also shift each time. Could someone please help with how to change the array for this?
Thanks
Annie :)
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
What do you want to look up exactly? You can use INDEX/MATCH to return a reference to the starting cell of the lookup table.
 
Upvote 0
Hi All :)
I'm trying to do a Vlookup on a file that gets automatically downloaded to the computer from a website. The data is in lots of different data sets, like so:
Loans to countries
Mar
Apr
May
Jun

Loans to banks
Mar
Apr
May
Jun

Every month a new row of data gets added to each table, meaning the start and end cells of the array also shift each time. Could someone please help with how to change the array for this?
Thanks
Annie :)
Just refer to the entire column.

Instead of doing this:

=VLOOKUP(A1,X1:Y10,2,0)

Do it like this:

=VLOOKUP(A1,X:Y,2,0)
 
Upvote 0
Thank you very much, I'm very grateful that you took the time to answer, but I'm going to try writing a macro to perform the same function.
 
Upvote 0

Forum statistics

Threads
1,216,116
Messages
6,128,926
Members
449,479
Latest member
nana abanyin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top