Forum Discussion

ljoseph888's avatar
ljoseph888
Copper Contributor
Jul 09, 2020
Solved

How to Count instances of a variable within another

Complicated to explain . . . but I am trying to take a data set that looks something like this, with varying number of entries per person:   1.    person 1              A 2.    person 1           ...
  • SergeiBaklan's avatar
    Jul 09, 2020

    ljoseph888 

    For such sample

    One variant:

    In E2

    =UNIQUE($B$2:$B$10)

    in F2

    =IFERROR(AGGREGATE(14,6,1/($B$2:$B$10=E2)*COUNTIFS($B$2:$B$10,$B$2:$B$10,$C$2:$C$10,$C$2:$C$10),1),"")

    and drag it down.

     

    Another variant - Power Query as in attached file.

Resources