Reputation: 723
Let's say I have a list of names:
And I have another list for how many rows of each name I want to see:
How do I create a formula that outputs the following (notice how I want to take the first X of each first + last name grouping):
Here is the link to the Google sheets if you'd like to write it out: https://docs.google.com/spreadsheets/d/16hBmQmC3IKyJwnPpx_xCf1WXlATEGbJpKwo8nlcB5So/edit#gid=0
Upvotes: 1
Views: 226
Reputation: 29904
Added solution to your tab here
=QUERY(MAP(A2:A,B2:B,C2:C,INDEX(XLOOKUP(B2:B&C2:C,E:E&F:F,G:G,)),LAMBDA(ax,bx,cx,dx,IF(ax="",,IF(ax<=dx,{ax,bx,cx},)))),"Select * Where Col2!=''")
-
Upvotes: 3