Skip to content

Instantly share code, notes, and snippets.

@Grynn
Last active November 30, 2024 11:12
Show Gist options
  • Select an option

  • Save Grynn/23181f3e7c6b2273f5123901bfa0d28b to your computer and use it in GitHub Desktop.

Select an option

Save Grynn/23181f3e7c6b2273f5123901bfa0d28b to your computer and use it in GitHub Desktop.
Excel group by function
=LET(
groupColumn,D2:D9,
valueColumn,K2:K9,
uniqueGroups,UNIQUE(groupColumn),
aggregatedValues,SUMIF(groupColumn,uniqueGroups,valueColumn),
HSTACK(uniqueGroups,aggregatedValues)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment