メインコンテンツへスキップ

Excelの列の一意の値または数値を数える方法は?

ワークシートの範囲に値のリストがあり、一意の値がいくつあるかを知りたいとします。 それらをXNUMXつずつ識別して数えると、多くの時間を無駄にします。 そこで、ここでは、この問題に対処するための簡単なトリックをいくつか紹介します。

数式で一意の値の数を数える

高度なフィルターで一意の値の数を数える

Kutools forExcelで一意の値の数を数える


数式で一意の値の数を数える

範囲内の一意の値の数をすばやく数えるのに役立つ数式がいくつかあります。 たとえば、データが数値の場合、範囲(A1:A10)に数値の列があります。スクリーンショットを参照してください。

doc-count-unique-values1

次の式を使用できます。次のようにしてください。

1。 この式を入力してください =SUMPRODUCT(1/COUNTIF(A1:A10,A1:A10)) 空白のセルに。

doc-count-unique-values1

2。 次に、 入力します キーを押すと、一意の値の番号が表示されます。 スクリーンショットを参照してください:

doc-count-unique-values1

ヒント:1。これは別の式です =SUM(IF(FREQUENCY(A1:A10, A1:A10)>0,1)) また、あなたを助けることができます。 どなたでもお好きなように応募してください。 上記の両方の式は、最初の重複を含む一意の値もカウントします。

2。 ワークシートにテキストの範囲がある場合、上記の数式は機能しません。次の配列数式を使用する必要があります。 =SUM(IF(FREQUENCY(IF(LEN(A1:A10)>0,MATCH(A1:A10,A1:A10,0),""), IF(LEN(A1:A10)>0,MATCH(A1:A10,A1:A10,0),""))>0,1))

doc-count-unique-values1

数式を入力したら、忘れずにを押してください Shift + Ctrl + Enter キー、および一意の値の数が表示されています。

doc-count-unique-values1

注意:

  • 1.範囲 A1:A10 上記の式は可変ですが、必要に応じて変更できます。
  • 2.この式は、最初の重複を含む一意の値もカウントします。
  • 3.この数式は、さまざまなテキストと数字でも機能します。

高度なフィルターで一意の値の数を数える

高度なフィルターを使用して、データの列から一意の値を抽出し、それらを新しい場所に貼り付けることもできます。 次に、ROWS関数を使用して、新しい範囲内の一意の値の数をカウントします。 具体的な手順は次のとおりです。

1に設定します。 OK をクリックします。 且つ リボンのタブをクリックし、をクリックします 高機能 コマンド、スクリーンショットを参照してください:

doc-count-unique-values1

2。 とで 高度なフィルタ ダイアログボックス:

doc-count-unique-values1
  • (1.)選択 別の場所にコピーする 下のオプション Action;
  • (2.) リスト範囲 セクションをクリックします。 ドキュメントボタン1 使用する範囲データを選択するボタン。
  • (3.) コピー先 セクションをクリックします。 ドキュメントボタン1 フィルタリングされた一意の値を配置するセルを指定するボタン。
  • (4.)最後に確認してください ユニークなレコードのみ オプションを選択します。

3。 設定が終わったら、 OK、一意の値が新しい列にリストされています。スクリーンショットを参照してください。

doc-count-unique-values1

4。 次に、空白のセルに短い数式を入力します = ROWS(E1:E8)、を押します 入力します キーボードのキー。 そして、一意の値の数が表示されます。

doc-count-unique-values9 -2 doc-count-unique-values10

Kutools forExcelで一意の値の数を数える

 ここでは、便利なツールをお勧めします- Kutools for Excelそのと 重複セルと一意セルを選択します 関数を使用すると、重複する値または一意の値をすばやく選択して、それらの数を数えることができます。

Kutools for Excel : 300以上の便利なExcelアドインがあり、30日以内に制限なしで無料で試すことができます

インストールした後 Kutools for Excel、次の手順で実行してください。

1. 一意の値をカウントするデータ範囲を選択します。

2。 次に、をクリックします クツール > 選択 > 重複セルと一意セルを選択します、スクリーンショットを参照してください:

doc-count-unique-values11-11

3。 の中に 重複セルと一意セルを選択します ダイアログボックスで、 一意の値のみ or すべてユニーク(最初の複製を含む) 必要に応じて、同時に、チェックすることで一意の値を強調表示することもできます バックカラーを塗りつぶす or フォントの色を塗りつぶす結果の処理 セクション、スクリーンショットを参照してください:

doc-count-unique-values12-12

4。 (1.)選択した場合 一意の値のみ、一意の値のみがカウントされ、一度に選択されます。 スクリーンショットを参照してください:

doc-count-unique-values13-13

(2.)選択した場合 すべてユニーク(最初の複製を含む)、最初の重複を含むすべての一意の値がカウントされ、次のスクリーンショットのように選択されます。

doc-count-unique-values14-14

この[複製および一意のセルの選択]機能の詳細については、クリックしてください。

今すぐExcel用のKutoolsをダウンロードして無料トライアル!


デモ:Kutools forExcelで一意の値の数を数える

Kutools for Excel:300以上の便利なExcelアドインがあり、30日以内に制限なしで無料で試すことができます。 今すぐダウンロードして無料トライアル!


関連記事:

Excelで選択した範囲から一意のレコードをフィルタリングまたは選択するにはどうすればよいですか?

最高のオフィス生産性向上ツール

🤖 Kutools AI アシスタント: 以下に基づいてデータ分析に革命をもたらします。 インテリジェントな実行   |  コードを生成  |  カスタム数式の作成  |  データを分析してグラフを生成する  |  Kutools関数を呼び出す...
人気の機能: 重複を検索、強調表示、または識別する   |  空白行を削除する   |  データを失わずに列またはセルを結合する   |   数式なしのラウンド ...
スーパールックアップ: 複数の基準の VLookup    複数の値の VLookup  |   複数のシートにわたる VLookup   |   ファジールックアップ ....
詳細ドロップダウン リスト: ドロップダウンリストを素早く作成する   |  依存関係のドロップダウン リスト   |  複数選択のドロップダウンリスト ....
列マネージャー: 特定の数の列を追加する  |  列の移動  |  Toggle 非表示列の表示ステータス  |  範囲と列の比較 ...
注目の機能: グリッドフォーカス   |  デザインビュー   |   ビッグフォーミュラバー    ワークブックとシートマネージャー   |  リソースライブラリ (自動テキスト)   |  日付ピッカー   |  ワークシートを組み合わせる   |  セルの暗号化/復号化    リストごとにメールを送信する   |  スーパーフィルター   |   特殊フィルター (太字/斜体/取り消し線をフィルター...) ...
上位 15 のツールセット12 テキスト ツール (テキストを追加, 文字を削除する、...)   |   50+ チャート 種類 (ガントチャート、...)   |   40+ 実用的 (誕生日に基づいて年齢を計算する、...)   |   19 挿入 ツール (QRコードを挿入, パスから画像を挿入、...)   |   12 変換 ツール (数字から言葉へ, 通貨の換算、...)   |   7 マージ&スプリット ツール (高度な結合行, 分割セル、...)   |   ... もっと

Kutools for Excel で Excel スキルを強化し、これまでにない効率を体験してください。 Kutools for Excelは、生産性を向上させ、時間を節約するための300以上の高度な機能を提供します。  最も必要な機能を入手するにはここをクリックしてください...

説明


Officeタブは、タブ付きのインターフェイスをOfficeにもたらし、作​​業をはるかに簡単にします

  • Word、Excel、PowerPointでタブ付きの編集と読み取りを有効にする、パブリッシャー、アクセス、Visioおよびプロジェクト。
  • 新しいウィンドウではなく、同じウィンドウの新しいタブで複数のドキュメントを開いて作成します。
  • 生産性を 50% 向上させ、毎日何百回もマウス クリックを減らすことができます!
Comments (18)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
With the new UNIQUE function in Excel 365: COUNTA(UNIQUE(interval)).
This comment was minimized by the moderator on the site
tying to know the values of unique customer for different products, for ex: there are 100 customers, wanted to know out of those how many are unique customers who buy only those products. Likewise: total sales of products = 100 apple = 40 orange = 60 how to find out customers who have brought only oranges and apples?
This comment was minimized by the moderator on the site
in this formula, =SUM(IF(FREQUENCY(MATCH(B2:B10,B2:B10,0),MATCH(B2:B10,B2:B10,0))>0,1)) can i add another "if"? for example i want count the range of unique text in B2:B150 if C2:C150=1 ??? can i?
This comment was minimized by the moderator on the site
How would you seperate unique values in a cell? ie. #2,#2,#3 I only want the #2 to appear once?
This comment was minimized by the moderator on the site
no these formulas are not sufficient, in actual my problem is little bit big, there are lots of column in my sheet, with the name of store id and store name and months in three column respectively and there is repetition of store name in every month a no of time, i have to calculate the unique no of the store name with respect to month. please suggest me the exact formula accordingly.
This comment was minimized by the moderator on the site
Order Rep Status Product Order Value A1 John Close Apple $1 A1 John Close Pear $1.50 A2 John Open Orange $0.50 A3 John Close Grape $3.00 A2 John Open Apple $1 A4 John Close Orange $0.50 A5 Mary Close Apple $1 A6 Peter Close Grape $3.00 Appreciate your advice on this... I am trying to count the unique number of order # (first column), where the rep is John and the order status is closed. the result to achieve is 3 unique orders (A1, A3 and A4). But if i do a countifs function, it literally count the number of 'Close' where rep=John, and that comes back with 4. Is this possible to count unique values against multiple conditions of other columns?
This comment was minimized by the moderator on the site
Anyone know how to make the =SUM(IF(FREQUENCY(A1:A10, A1:A10)>0,1)) formula work to count the number of unique fields for a series of intervals? For example, I want to be able to find out the number of unique entries for each day. My data is structures as ID numbers in Column A, Dates in column B. The data is sorted by the date column. Any help would be very very much appreciated!
This comment was minimized by the moderator on the site
Your formula works a treat and allows me to see the number of unique clients that I have in total (i.e. from all my sales people combined). I am struggling however, to update the formula so that it would allow me to see the number of unique clients an individual sales person would have. Any ideas?
This comment was minimized by the moderator on the site
=SUMPRODUCT(1/COUNTIF(A1:A10,A1:A10))when you are selecting the range make sure that the cells should not be blank.
This comment was minimized by the moderator on the site
Hi, Thank you for your help regarding the duplicates but I'd like to modify your formula =SUM(IF(FREQUENCY(A2:A800, A2:A800)>0,1)) and add this condition (assuming that all the cells are numbers) to count only between 402 to 460 and it goes on to 502 to 560; 602 to 660 (1 formula per range) would it be possible? Thank you very much!
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations