Horizontal Lookup on Multiple Rows

Naru2

New Member
Joined
Apr 9, 2014
Messages
37
I have a spreadsheet with several years and values working down the page. I'm trying to find a formula where I can lookup a date to the data set, but the date is not always going to be in that first row, it could be several rows down. Then I need the corresponding number below it. So, find the date amongst several rows and then return the value that is 1 row below that. Thanks!

1714394088055.png
 
if you can't use the xl2bb then I suggest sanitizing your data for privacy and posting a copy of the file on Drop Box or some other sharing site.

But, regarding your data report itself? How did it get in this format? Do you have a source data file that you can use instead of this report that is very difficult to get other reporting out of?
 
Upvote 0

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Here is a link. The data is pasted in as full years to start, but then it's manipulated and reconfigured. I need the adjusted #'s to be put back into a normal calendar year. I thought there would be an easy way to look it up and straighten it out, but seems a bit more complicated.
 
Upvote 0
Here is a link. The data is pasted in as full years to start, but then it's manipulated and reconfigured. I need the adjusted #'s to be put back into a normal calendar year. I thought there would be an easy way to look it up and straighten it out, but seems a bit more complicated.
it does not show up there as an excel file. i just get a .png image placeholder. not even a picture of a worksheet.
 
Upvote 0
1) Your ranges weren't right
2) Your "Shipments" had spaces. (There's an increase indent option under the Alignment on the Home tab).
Book1
ABCDEFGHIJKLMNO
1
2789101112123456
3Year 12025-012025-022025-032025-042025-052025-062024-072024-082024-092024-102024-112024-12
4Total5g3,1053,6704,1593,0912,6873,3522,0682,5443,4672,7043,2645,04139,152
5Total3,1053,6704,1593,0912,6873,3522,0682,5443,4672,7043,2645,04139,152
6
795%95%95%95%95%95%95%95%95%95%95%95%
8
95g25%25%25%25%25%25%25%25%25%25%25%25%
10
11Units5g7378729887346387964916048236427751,1979,299
12Total7378729887346387964916048236427751,1979,299
13
14Pipeline Fill5g
15
16Replenishment100%100%100%100%100%100%50%100%100%100%100%100%
17
18 Shipments5g7378729887346387962466048236427751,1979,053
19Total7378729887346387962466048236427751,1979,053
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36Year 22026-012026-022026-032026-042026-052026-062025-072025-082025-092025-102025-112025-12
37Total5g3,1053,6704,1593,0912,6873,3522,0682,5443,4672,7043,2645,04139,152
38Total3,1053,6704,1593,0912,6873,3522,0682,5443,4672,7043,2645,04139,152
39
4095%95%95%95%95%95%95%95%95%95%95%95%
41
425g25%25%25%25%25%25%25%25%25%25%25%25%
43
44Units5g7378729887346387964916048236427751,1979,299
45Total7378729887346387964916048236427751,1979,299
46
47Replenishment100%100%100%100%100%100%100%100%100%100%100%100%
48
49 Shipments5g7378729887346387964916048236427751,1979,299
50Total7378729887346387964916048236427751,1979,299
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68JanFebMarAprMayJunJulAugSepOctNovDec
6920257378729887346387964916048236427751197
702026737872988734638796
71
72LOOKUP:2025-012025-022025-032025-042025-052025-062025-072025-082025-092025-102025-112025-12
732026-012026-022026-032026-042026-052026-062026-072026-082026-092026-102026-112026-12
Sheet1
Cell Formulas
RangeFormula
C69:N69,C70:H70C69=LET( r,MIN(IF(C72=$A$1:$O$65,ROW($A$1:$O$65))), c,MIN(IF(C72=$A$1:$O$65,COLUMN($A$1:$O$65))), d,DROP($A$1:$O$65,r), f,FILTER(d,TRIM(CHOOSECOLS(d,1))="Shipments"), INDEX(f,1,c))
 
Upvote 0
I didn't even notice that! As soon as I fixed that all the formulas populated. This is pretty cool! Thank you so much for sticking it out with me. :)
 
Upvote 0
Microsoft 365

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
When I took the spacing out of the word "Shipments", it fixed the formula for one of the years, but not the other. Now I get a "SPILL" error.

Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2025 #SPILL! #SPILL! #SPILL! #SPILL! #SPILL! #SPILL! 491 604 823 642 775 1,197
2026 737 872 988 734 638 796
 
Upvote 0
It's because those dates are not in the data. I've added error handler when that happens.
Excel Formula:
=LET(
r,MIN(IF(C72=$A$1:$O$65,ROW($A$1:$O$65))),
c,MIN(IF(C72=$A$1:$O$65,COLUMN($A$1:$O$65))),
d,DROP($A$1:$O$65,r),
f,FILTER(d,TRIM(CHOOSECOLS(d,1))="Shipments"),
IF(r=0,"",INDEX(f,1,c)))
 
Upvote 0
The 2025 data starts in row C3, so there should be values returned. When you remove the spacing from "Shipments", then the error shows up, which is strange.
 

Attachments

  • Capture.PNG
    Capture.PNG
    6.8 KB · Views: 3
Upvote 0

Forum statistics

Threads
1,216,119
Messages
6,128,946
Members
449,480
Latest member
yesitisasport

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