Two Column Look Up the return value

AliaNi

New Member
Joined
Oct 19, 2022
Messages
33
Office Version
  1. 2010
Platform
  1. Windows
I am trying to find a formula which looks up the day first (Row two) and then looks up the metric row (Row three) and then retur the average of that column for me.

I tried installing Xl2bb but it won't work on my computer.

How do you do that? I ran out of all ideas.



1675436105970.png
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
in the example you provide what result do you expect? both row 2 and row 3 are blank.
 
Upvote 0
in the example you provide what result do you expect? both row 2 and row 3 are blank.
I created another table. I added the expected results, but I want to be able to do that using formulas and xlookup or any other way for when I don't know the size of the datasets.

I have been trying to do it for a while now but it's not working.

For example, the crossing of Sun and Metric 1 should yield 49 (The median for that column).









Book1
ABCDEFG
1SundayMonday
2IDMetric 1Metric 2Metric 3Metric 1Metric 2Metric 3
32335455237584
43233333339872
54652288446577
61921133553356
7
8expected results4927.54438.57074.5
9
10Metric 1Metric 2Metric 3
11Sunday
12Monday
Sheet1
Cell Formulas
RangeFormula
B8:G8B8=MEDIAN(B3:B6)
 
Last edited:
Upvote 0
This is not ultra dynamic, you have to adjust ranges in the first calculation and then copy over and down.

Also, you have an extra space at the end of Sunday.

WorkBook1.xlsx
ABCDEFG
1SundayMonday
2IDMetric 1Metric 2Metric 3Metric 1Metric 2Metric 3
32335455237584
43233333339872
54652288446577
61921133553356
7
8expected results4927.54438.57074.5
9
10Metric 1Metric 2Metric 3
11Sunday4927.544
12Monday38.57074.5
Sheet5
Cell Formulas
RangeFormula
B8:G8B8=MEDIAN(B3:B6)
B11:D12B11=MEDIAN(INDEX($B$3:$G$6,1, MATCH($A11,$B$1:$G$1,0) +MATCH(B$10,$B$2:$D$2,0)-1):INDEX($B$3:$G$6,ROWS($A$3:$A$6), MATCH($A11,$B$1:$G$1,0) +MATCH(B$10,$B$2:$D$2,0)-1))
 
Upvote 0
Solution
And, I'm happy you got the xl2bb add in working!

How will you be adding data into this worksheet? Always down, always to the right, or both?
Is there a lot of data? The structure of your data at the top is not very conducive to analysis if you can change that it would be great. If you only add new rows, Power Query (An add-in for 2010 excel, I think) is a great tool that can update data as you add.

If you add columns, that is more difficult.
.
 
Upvote 0
How will you be adding data into this worksheet? Always down, always to the right, or both?
Is there a lot of data? The structure of your data at the top is not very conducive to analysis if you can change that it would be great. If you only add new rows, Power Query (An add-in for 2010 excel, I think) is a great tool that can update data as you add.

If you add columns, that is more difficult.
.
So I will have 7 columns but it's the number of rows which keeps changing. But I do know that the number will not be exceeding a certain number so I guess it should work. It is now returning N/As I have to check what I did wrong.
 
Upvote 0
And, I'm happy you got the xl2bb add in working!

How will you be adding data into this worksheet? Always down, always to the right, or both?
Is there a lot of data? The structure of your data at the top is not very conducive to analysis if you can change that it would be great. If you only add new rows, Power Query (An add-in for 2010 excel, I think) is a great tool that can update data as you add.

If you add columns, that is more difficult.
.
1676133296188.png
 
Upvote 0
you need to let me see your formula
Book1
ABCDEFG
1SundayMonday
2IDMetric 1Metric 2Metric 3Metric 1Metric 2Metric 3
32335455237584
43233333339872
54652288446577
61921133553356
7
8expected results4927.54438.57074.5
9
10Metric 1Metric 2Metric 3
11Sunday #N/A#N/A#N/A
12Monday
Sheet1
Cell Formulas
RangeFormula
B8:G8B8=MEDIAN(B3:B6)
B11:D11B11=MEDIAN(INDEX($B$3:$G$6,1, MATCH($A11,$B$1:$G$1,0) +MATCH(B$10,$B$2:$D$2,0)-1):INDEX($B$3:$G$6,ROWS($A$3:$A$6), MATCH($A11,$B$1:$G$1,0) +MATCH(B$10,$B$2:$D$2,0)-1))
 
Upvote 0
You still have the space after Sunday in cell A11
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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