count distinct values in spreadsheet

前端 未结 7 1865
独厮守ぢ
独厮守ぢ 2020-12-12 23:22

I have a Google spreadsheet with a column that looks like this:

City
----
London
Paris
London
Berlin
Rome
Paris

I want to count the appeara

7条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-12 23:52

    This is similar to Solution 1 from @JSuar...

    Assume your original city data is a named range called dataCity. In a new sheet, enter the following:

        A                 | B
      ----------------------------------------------------------
    1 | =UNIQUE(dataCity) | Count
    2 |                   | =DCOUNTA(dataCity,"City",{"City";$A2})
    3 |                   | [copy down the formula above]
    4 |                   | ...
    5 |                   | ...
    

提交回复
热议问题