Vlookup Range Issues

Salesopspain

New Member
Joined
Jul 20, 2022
Messages
4
Office Version
  1. 2021
Platform
  1. Windows
I'm working with a large data set and need to click & drag my vlookup formula but need the range to auto adjust. I have an example of my current structure below where I manually shift the range.

Cell B2: =ifna(vlookup($D$1,'Sheet 2'!$A$1:I$685,7,0),0)
Cell C2: =ifna(vlookup($D$1,'Sheet 2'!$K$1:S$685,7,0),0)
So on and so forth for 365 cells

How can I setup the formulas so the range automatically adjusts 10 cells over?
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Hi and welcome to the board.

Q1. What is below row 685?
Q2. Have you considered using a table?
 
Upvote 0
Hi and welcome to the board.

Q1. What is below row 685?
Q2. Have you considered using a table?
Q1: Nothing is below it
Q2: I have not but I didn't think the data on Sheet 2 would fit well into one table. Each range of cells in the vlookup makes up 1 day; with 365 different ranges each with a similar data set I didn't think a table would work well.
 
Upvote 0
OK thanks, give this a try

Cell B2: =ifna(vlookup($D$1,'Sheet 2'!$A:$I,7,0),0)
Cell C2: =ifna(vlookup($D$1,'Sheet 2'!$K:$S,7,0),0)

Or

B2: =XLOOKUP($D$1,'Sheet 2'!$A:$A,'Sheet 2'!$G:$G,0)
C2: =XLOOKUP($D$1,'Sheet 2'!$K:$K,'Sheet 2'!$Q:$Q,0)
 
Upvote 0
OK thanks, give this a try

Cell B2: =ifna(vlookup($D$1,'Sheet 2'!$A:$I,7,0),0)
Cell C2: =ifna(vlookup($D$1,'Sheet 2'!$K:$S,7,0),0)

Or

B2: =XLOOKUP($D$1,'Sheet 2'!$A:$A,'Sheet 2'!$G:$G,0)
C2: =XLOOKUP($D$1,'Sheet 2'!$K:$K,'Sheet 2'!$Q:$Q,0)
That's not exactly solving my current problem - I'm trying to have the column parameters change without me manually inputing the $K:$S portion. i.e. if I wanted to go to D2 the formula would automatically update to =ifna(vlookup($D$1,'Sheet 2'!$U:$AC,7,0),0)

Does that make more sense? Sorry for the poor initial description
 
Upvote 0
Try:

Book1
ABCDEF
1xx
2234600
32346000
Sheet13
Cell Formulas
RangeFormula
B2:E2C2=IFNA(VLOOKUP($D$1,INDEX(Sheet2!$1:$1,COLUMNS($B2:C2)*10-9):INDEX(Sheet2!$685:$685,COLUMNS($B2:C2)*10-1),7,0),0)
B3:NB3B3=SUMIFS(OFFSET(Sheet2!G1:G685,0,SEQUENCE(,365,0,10)),OFFSET(Sheet2!A1:A685,0,SEQUENCE(,365,0,10)),D1)
Dynamic array formulas.


The B2 formula you'll have to drag across 365 times. The B3 formula you just need to enter in B3 once, but it only works if the data you want to return is numeric.
 
Upvote 0
Solution
Try:

Book1
ABCDEF
1xx
2234600
32346000
Sheet13
Cell Formulas
RangeFormula
B2:E2C2=IFNA(VLOOKUP($D$1,INDEX(Sheet2!$1:$1,COLUMNS($B2:C2)*10-9):INDEX(Sheet2!$685:$685,COLUMNS($B2:C2)*10-1),7,0),0)
B3:NB3B3=SUMIFS(OFFSET(Sheet2!G1:G685,0,SEQUENCE(,365,0,10)),OFFSET(Sheet2!A1:A685,0,SEQUENCE(,365,0,10)),D1)
Dynamic array formulas.


The B2 formula you'll have to drag across 365 times. The B3 formula you just need to enter in B3 once, but it only works if the data you want to return is numeric.
Thanks! That got things up and running
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,453
Members
448,967
Latest member
grijken

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