VLookup: automatic column changes

aallaman

New Member
Joined
Dec 4, 2009
Messages
44
Please Help!

I am working with a worksheet in which I have a vlookup function that needs to be drag and copied 120 columns across. At each change in column, I need the column index number, in the vlookup function, to increase by one.

=vlookup($a1,B:CD,1,false) =vlookup($a1,B:CD,2,false) =vlookup($a1,B:CD,3,false)

Does anyone know of a way to write the formula so that the col_index_num changes automatically when you copy it across columns?

Do I need to use {}? What are {} for?

Thanks!!!!!!1
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Use this in the first cell, then copy to the right:

=VLOOKUP($A1, $B:$CD, COLUMNS($A:A), FALSE)
 
Upvote 0
Hello aalaman, you can use COLUMNS function in place of the column index so that it changes as you drag across but possibly better to use INDEX/MATCH, i.e. this formula copied across

=INDEX(B:B,MATCH($A1,$B:$B,0))

Note the MATCH function won't change as you drag across but the INDEX column will.....
 
Upvote 0
Here are a couple of options:

x3xshk.jpg
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,427
Members
448,961
Latest member
nzskater

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