create column of unique values in date range possibly vstack

foranpower

New Member
Joined
Nov 4, 2019
Messages
8
Office Version
  1. 2021
Platform
  1. Windows
based on this thread, vstack seems to be able to create a column of unique values in a date range:

The goal is highest total value and the champion of the person with the highest sum in the date range. So whoever knocks down the most pins during the competition.
name
datepinsstart dateend datestacked unique namestotal pins
fred
3/28/2024​
73/1/20243/29/2024wilma (if possible first named based on having the most bowling pins knocked down)9 = (5+4)
wilma
3/15/2024​
5fred7
wilma
3/7/2024​
4
dino
2/28/2024​
3

Here Wilma would win because during March she had the most pins kocked down, and dino would not show up because he did not bowl during the month.

Tried this formula based on the other post, but get a #name error.
=TOCOL(IF((B2:B5>=E2)*(B2:B5<=F2)*(A2:A5<>""),A2:A5,1/0),3,1)
 
Thank you Fluffy and Alansidman. :)


Fluffy, your method works so simply and geniusly. Not sure how you did it.


Alan, I am looking forward to testing your work because it is teaching me a lot about power query methods that I would not have guessed.

Sincerely,
Forest
 
Upvote 0

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,215,479
Messages
6,125,041
Members
449,206
Latest member
Healthydogs

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