VLOOKUP peculiar problem

anuradhagrewal

New Member
Joined
Dec 3, 2020
Messages
38
Office Version
  1. 2010
Platform
  1. Windows
Hi
I have a peculiar problem while using VLOOKUP
The issue at hand is this
1)There are two sheets say Sheet 1 and Sheet 2
2)Now I have to look up variable in Row A2 in Sheet 1 for a given date in a specified range in Sheet 2.
3)So I do a this action for eg vlookup($A1, sheet2!$A2$:$F$1789,2,false).
4) Now the problem is that the variables $A1,$A2 etc and the range remain constant but the column to look up and paste the values in sheet 1 i.e "2" keeps changing as per date.

My problem is that everytime I copy the above formula across columns the value of col_index_num needs to be changed manually to lookup the range in that column of Sheet 2.
For eg in B1 the vlookup formula would be vlookup($A1, sheet2!$A2$:$F$1789,2,false)
For eg in B2 the vlookup formula would be vlookup($A1, sheet2!$A2$:$F$1789,3,false) and so on.

Please advice if there is anyway the col_index_num can incrementally increase automatically eg 2,3,4, etc.


Regards

Anuradha
 

Attachments

  • example.png
    example.png
    8.9 KB · Views: 8

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

etaf

Well-known Member
Joined
Oct 24, 2012
Messages
5,096
Office Version
  1. 365
Platform
  1. MacOS
try
vlookup($A1, sheet2!$A2$:$F$1789,row()+1,false)

In B1 , then the ROW() will be 1 , then 1 + 1 = 2
IN B2 , the row() will be 2 , then 2+1 = 3
etc

your range is A : F
so will only work
to row 5
row() + 1 , will = 6
and F is the final column to return from
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
51,721
Office Version
  1. 365
Platform
  1. Windows
My problem is that everytime I copy the above formula across columns the value of col_index_num needs to be changed manually to lookup the range in that column of Sheet 2.
For eg in B1 the vlookup formula would be vlookup($A1, sheet2!$A2$:$F$1789,2,false)
For eg in B2 the vlookup formula would be vlookup($A1, sheet2!$A2$:$F$1789,3,false) and so on.
I think that you are confusing rows/columns and/or across/down.
Above in red I have highlighted "across columns" but B1 and B2 that you then discuss are not across columns but down a single column.
Please clarify carefully.
 

Forum statistics

Threads
1,147,571
Messages
5,741,895
Members
423,693
Latest member
Excelquestion35

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
Top