Data lookup in a fixed position

BijanBorazjani

New Member
Joined
Oct 22, 2021
Messages
25
Office Version
  1. 365
Platform
  1. Windows
Good Morning,

I have a grid of data in a sheet, all of which is formatted the same. I need to match a week number, and retrieve data offset from the matched cell. The offset will always be the same, one column over and 6 rows down. When i use the offset match combo, it gives me an N/A error. So on the "Calls Total" Sheet, i need it to match Week # and pull the data from the totals cell.

Book1
ABCDEF
1Week 1CallsTicketsWeek 2CallsTickets
21/1/20221/8/2022
31/2/20221/9/2022
41/3/20221/10/2022
51/4/20221/11/2022
61/5/20221/12/2022
7Total00Total00
8Week 3CallsTicketsWeek 4CallsTickets
91/15/20221/22/2022
101/16/20221/23/2022
111/17/20221/24/2022
121/18/20221/25/2022
131/19/20221/26/2022
14Total00Total00
Name 1
Cell Formulas
RangeFormula
B7:C7,E14:F14,B14:C14,E7:F7B7=SUM(B2:B6)


Book1
ABCDEF
1Week 1CallsTicketsWeek 2CallsTickets
21/1/20221/8/2022
31/2/20221/9/2022
41/3/20221/10/2022
51/4/20221/11/2022
61/5/20221/12/2022
7Total00Total00
8Week 3CallsTicketsWeek 4CallsTickets
91/15/20221/22/2022
101/16/20221/23/2022
111/17/20221/24/2022
121/18/20221/25/2022
131/19/20221/26/2022
14Total00Total00
Name 2
Cell Formulas
RangeFormula
B7:C7,E14:F14,B14:C14,E7:F7B7=SUM(B2:B6)


Book1
ABCD
1Name 1Name 2Name 3
2Week 1#N/A
3Week 2
4Week 3
5Week 4
Call Totals
Cell Formulas
RangeFormula
B2B2=OFFSET('Name 1'!A1,MATCH(A2,'Name 1'!A1:F14,0),5,2)
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Here is an approach to pull in the "Calls" totals:
Book3
ABCD
1Name 1Name 2Name 3
2Week 1114#REF!
3Week 21224#REF!
4Week 3315#REF!
5Week 4889#REF!
Call Totals
Cell Formulas
RangeFormula
B2:D5B2=LET(arry,INDIRECT("'"&B$1&"'!"&"$A$1:$F$14"), r,ROWS(arry),c,COLUMNS(arry),wkpos,MAX(IF(arry=$A2,SEQUENCE(r,c))),valpos,wkpos+6*c+1,INDEX(arry,INT(valpos/c)+1,MOD(valpos,c)))
 
Upvote 0
I discovered an error in the last step of the formula I posted. Here is a corrected version (green) for returning the Call Totals and the Ticket Totals. Another option (blue) does the same, but finds the value to return a little differently:
MrExcel_20220805.xlsx
ABC
30Call TotalsName 1Name 2
31Week 1114
32Week 21224
33Week 3315
34Week 4889
35
36Tickets TotalsName 1Name 2
37Week 140
38Week 2990
39Week 390
40Week 49990
41
42Call TotalsName 1Name 2
43Week 1114
44Week 21224
45Week 3315
46Week 4889
47
48Tickets TotalsName 1Name 2
49Week 140
50Week 2990
51Week 390
52Week 49990
Call Totals
Cell Formulas
RangeFormula
B31:C34B31=LET(arry,INDIRECT("'"&B$1&"'!"&"$A$1:$F$14"), r,ROWS(arry),c,COLUMNS(arry),wkpos,MAX(IF(arry=$A31,SEQUENCE(r,c))),valpos,wkpos+6*c+1,INDEX(arry,QUOTIENT(valpos-1,c)+1,MOD(valpos-1,c)+1))
B37:C40B37=LET(arry,INDIRECT("'"&B$1&"'!"&"$A$1:$F$14"), r,ROWS(arry),c,COLUMNS(arry),wkpos,MAX(IF(arry=$A37,SEQUENCE(r,c))),valpos,wkpos+6*c+2,INDEX(arry,QUOTIENT(valpos-1,c)+1,MOD(valpos-1,c)+1))
B43:C46B43=LET(arry,INDIRECT("'"&B$1&"'!"&"$A$1:$F$14"), r,ROWS(arry),c,COLUMNS(arry),wkpos,MAX(IF(arry=$A43,SEQUENCE(r,c))),valpos,wkpos+6*c+1,MAX(IF(SEQUENCE(r,c)=valpos,arry,"")))
B49:C52B49=LET(arry,INDIRECT("'"&B$1&"'!"&"$A$1:$F$14"), r,ROWS(arry),c,COLUMNS(arry),wkpos,MAX(IF(arry=$A49,SEQUENCE(r,c))),valpos,wkpos+6*c+2,MAX(IF(SEQUENCE(r,c)=valpos,arry,"")))
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,323
Members
449,077
Latest member
jmsotelo

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