Look up to return value from first cell from left

amolvijay

Board Regular
Joined
Nov 13, 2012
Messages
102
Office Version
  1. 365
Platform
  1. Windows
Hi Experts
I am working on dataset where monthwise/quarterwise data is populated from master table. I need to create a summary table which will have values only from last month of the quarter...So summary table should look for quarter name in the main dataset and return values only from first left or last right column of that quarter..

Plz help with formula

Q2Q2Q2Q3Q3Q3Q4Q4Q4
JULAUGSEPOCTNOVDECJANFEBMAR
SIG
20​
30​
40​
40​
45​
50​
45​
30​
20​
GBU
40​
40​
45​
50​
45​
30​
20​
10​
30​
DM
25​
30​
35​
40​
45​
50​
45​
30​
20​
GRF
30​
35​
40​
45​
50​
55​
60​
65​
70​
Q2Q3Q4
SIG
40​
50​
20​
GBU
45​
30​
30​
DM
35​
50​
20​
GRF
40​
55​
70​
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Here is a couple of ways you could do it:
Book1 (version 1).xlsb
ABCDEFGHIJ
1Q2Q2Q2Q3Q3Q3Q4Q4Q4
2JULAUGSEPOCTNOVDECJANFEBMAR
3SIG203040404550453020
4GBU404045504530201030
5DM253035404550453020
6GRF303540455055606570
7
8
9
10Q2Q3Q4
11SIG405020
12GBU453030
13DM355020
14GRF405570
15
16
17Q2Q3Q4
18SIG405020
19GBU453030
20DM355020
21GRF405570
Sheet1
Cell Formulas
RangeFormula
B11:D14B11=XLOOKUP($B$10:$D$10,$B$1:$J$1,B3:J3,,,-1)
B18:D21B18=TAKE(FILTER(B3:J6,B1:J1=B17),,-1)
Dynamic array formulas.
 
Upvote 0
Here is a couple of ways you could do it:
Book1 (version 1).xlsb
ABCDEFGHIJ
1Q2Q2Q2Q3Q3Q3Q4Q4Q4
2JULAUGSEPOCTNOVDECJANFEBMAR
3SIG203040404550453020
4GBU404045504530201030
5DM253035404550453020
6GRF303540455055606570
7
8
9
10Q2Q3Q4
11SIG405020
12GBU453030
13DM355020
14GRF405570
15
16
17Q2Q3Q4
18SIG405020
19GBU453030
20DM355020
21GRF405570
Sheet1
Cell Formulas
RangeFormula
B11:D14B11=XLOOKUP($B$10:$D$10,$B$1:$J$1,B3:J3,,,-1)
B18:D21B18=TAKE(FILTER(B3:J6,B1:J1=B17),,-1)
Dynamic array formulas.
Thank you Georgiboy.. it worked
However I am looking for two dimensional array where A11:A14 sequence wont be the same in larger dataset. The formula should look for the dept (SIG, GBU etc) and return quarterwise details in summary table
 
Upvote 0
Another option:
Book1
ABCDEFGHIJ
1Q2Q2Q2Q3Q3Q3Q4Q4Q4
2JULAUGSEPOCTNOVDECJANFEBMAR
3SIG203040404550453020
4GBU404045504530201030
5DM253035404550453020
6GRF303540455055606570
7
8
9
10Q2Q3Q4
11DM355020
12GBU453030
13SIG405020
14GRF405570
Sheet1
Cell Formulas
RangeFormula
B11:D14B11=LET(tRng,A1:J6,c,A11:A14,r,B10:D10, q,TAKE(DROP(tRng,,1),1), data,CHOOSECOLS(tRng,1,BYCOL(r,LAMBDA(x,MAX(IF(q=x,COLUMN(q)))))), INDEX(data,MATCH(c,INDEX(data,,1),0),MATCH(r,INDEX(data,1,0))) )
Dynamic array formulas.
 
Upvote 0
Another option
Fluff.xlsm
ABCDEFGHIJ
1Q2Q2Q2Q3Q3Q3Q4Q4Q4
2JULAUGSEPOCTNOVDECJANFEBMAR
3SIG203040404550453020
4GBU404045504530201030
5DM253035404550453020
6GRF303540455055606570
7
8
9Q2Q3Q4
10DM355020
11GRF405570
12SIG405020
13GBU453030
Data
Cell Formulas
RangeFormula
B10:D13B10=XLOOKUP(B$9:D$9,$B$1:$J$1,FILTER($B$3:$J$6,$A$3:$A$6=A10),,,-1)
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,180
Members
453,021
Latest member
Justyna P

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