Need countunique help

Solved

I have a sheet that is for a buck n doe (stag & doe) that is a list of names that corresponds with a prize #.

We are trying to have the sheet calculate the sales based on certain criteria.

The sheet is set up as follows: column A is for names, column B is for ticket #, column C is for prize #.

The sales criteria is for the ticket sales. $2 each ticket (1 name in column A), 3 tickets for $5 (3 names in column A), 15 tickets for $20 (15 names in Column A).

I have a countunique formula currently set as A9:A to count the total number of separate sales based on unique names.

What I would like to do is set up formulas for the names based on the number of names there are in column A (15 consecutive rows of "Ryan B" = 1 sale of 15 tickets for $20)

Can someone help me please? See sample link below, the cells I need help with are E2, E3, and E4

EDIT: sample sheet here: https://docs.google.com/spreadsheets/d/1e_SUb6OFfd_wdZmerU0IL4nwtsHu38OBfIZ5h1dS4x8/edit?usp=sharing

Posted Apr 16, 2022, 10:33 PM UTC ยท edited

17
RemcoE33107โ€ข

Please create a sample sheet with a sample with your input.

2
Doctor_NevinOPโ€ข

Sample created and added to post

1
RemcoE33107โ€ข

I think this is what you need....

=INDEX(QUERY(
  QUERY({A9:A},"
  SELECT COUNT(Col1) 
  WHERE Col1 IS NOT NULL 
  GROUP BY Col1 
  LABEL COUNT(Col1) ''"),
 "SELECT Col1, 
 COUNT(Col1) 
 GROUP BY Col1 
 ORDER BY Col1
 LABEL COUNT(Col1) ''
"),,2)
2
Doctor_NevinOPโ€ข

Thank you! You're the best this works fantastic! It was hard to describe exactly what I was wanting the formula to do, marking as solved

1
RemcoE33107โ€ข

You're welcome! Sample sheets are so much better ๐Ÿ™‚

2
[deleted]โ€ข

[removed]

1
AutoModeratorMODโ€ข

Posting your data can make it easier for others to help you, but it looks like your submission doesn't include any. If this is the case and data would help, you can read how to include it in the submission guide. You can also use this tool created by a Reddit community member to create a blank Google Sheets document that isn't connected to your account. Thank you.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1
Decronym:assistant: Functions Explainedโ€ข

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

|Fewer Letters|More Letters| |-------|---------|---| |COUNT|Returns the a count of the number of numeric values in a dataset| |FALSE|Returns the logical value FALSE| |INDEX|Returns the content of a cell, specified by row and column offset| |NOT|Returns the opposite of a logical value - NOT(TRUE) returns FALSE; NOT(FALSE) returns TRUE| |QUERY|Runs a Google Visualization API Query Language query across data| |TRUE|Returns the logical value TRUE|


^(4 acronyms in this thread; )^(the most compressed thread commented on today)^( has 5 acronyms.)
^([Thread #4187 for this sub, first seen 17th Apr 2022, 18:43]) ^[FAQ] ^([Full list]) ^[Contact] ^([Source code])

1