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

Excelで日付/月/年と日付範囲でカウントする方法は?

たとえば、誕生日の会員名簿があり、現在、これらの会員の誕生日カードを作成する準備をしています。 バースデーカードを作成する前に、特定の月/年/日付にある誕生日の数を数える必要があります。 ここでは、次の方法でExcelの数式を使用して、日付/月/年および日付範囲ごとにCountifを紹介します。


Excelの数式を使用して、特定の月/年および日付範囲でカウント

このセクションでは、Excelで特定の月、年、または日付範囲で誕生日をカウントするための数式をいくつか紹介します。

特定の月までにカウント

特定の月の8歳の誕生日を数える場合は、以下の数式を空白のセルに入力して、を押します。 入力します キー。

= SUMPRODUCT(1 *(MONTH(C3:C16)= G2))

注意:

上記の数式で、C3:C16は誕生日をカウントする指定された生年月日列であり、G2は特定の月番号のセルです。

この配列数式を適用することもできます = SUM(IF(MONTH(B2:B15)= 8,1)) (Ctrl + Shift + Enterキーを押して)特定の月ごとに誕生日を数えます。

ある年までにカウント

1988年によると、特定の年までに誕生日を数える必要がある場合は、必要に応じて次のいずれかの式を使用できます。

= SUMPRODUCT(1 *(YEAR(C3:C16)= 1988))
= SUM(IF(YEAR(B2:B15)= 1988,1))

注:XNUMX番目の数式は配列数式です。 を押すことを忘れないでください Ctrlキー + シフト + 入力します 数式を入力した後、一緒にキーを押します。

特定の日付までにカウント

特定の日付(たとえば1992-8-16)でカウントする必要がある場合は、以下の式を適用して、Enterキーを押してください。

=COUNTIF(B2:B15,"1992-8-16")

特定の日付範囲によるカウント

特定の日付(たとえば1990-1-1)より後/前の場合にカウントする必要がある場合は、次の式を適用できます。

= COUNTIF(B2:B15、 ">"& "1990-1-1")
= COUNTIF(B2:B15、 "<"& "1990-1-1")

1988つの特定の日付(たとえば1-1-1998と1-1-XNUMXの間)の間であるかどうかをカウントするには、以下の式を適用してください。

=COUNTIFS(B2:B15,">"&"1988-1-1",B2:B15,"<"&"1998-1-1")

ノートリボン 数式は複雑すぎて覚えられませんか? 数式を定型句として保存して、後でワンクリックで再利用できるようにします。
続きを読む...     無料体験

簡単に数える Excelの会計年度、半年、週番号、または曜日

Kutools for Excelが提供するピボットテーブルの特別な時間グループ化機能は、ヘルパー列を追加して、指定された日付列に基づいて会計年度、半年、週番号、または曜日を計算し、簡単に数えたり、合計したりすることができます。 、または新しいピボットテーブルの計算結果に基づく平均列。


Kutools for Excel - 300 以上の必須ツールで Excel を強化します。 クレジット カードは必要なく、全機能を備えた 30 日間の無料トライアルをお楽しみください。 今すぐ入手

Excelで指定された日付、年、または日付範囲によるカウント

Kutools for Excelがインストールされている場合は、それを適用できます 特定のセルを選択 Excelで指定された日付、年、または日付範囲で発生数を簡単にカウントするユーティリティ。

Kutools for Excel- Excel 用の便利なツールが 300 以上含まれています。 30 日間の全機能無料トライアル、クレジット カードは必要ありません。 今すぐ入手

1。 カウントする誕生日の列を選択し、をクリックします クツール > 選択 > 特定のセルを選択。 スクリーンショットを参照してください:

2。 [特定のセルを選択]ダイアログボックスを開いて、上記のスクリーンショットのようにしてください。
で(1) 選択タイプ セクションでは、必要に応じてXNUMXつのオプションを確認してください。 私たちの場合、私たちはチェックします セル オプション;
で(2) 特定のタイプ セクションで、 以上 最初のドロップダウンリストから、右のボックスに指定した日付範囲の最初の日付を入力します。 次に、 以下 XNUMX番目のドロップダウンリストから、指定した日付範囲の最終日を右のボックスに入力し、チェックボックスをオンにします オプション;
(3)をクリックします Ok

3。 これで、ダイアログボックスが表示され、以下のスクリーンショットに示すように、選択された行数が表示されます。 クリックしてください OK ボタンをクリックして、このダイアログボックスを閉じます。

注意:
(1)指定された年ごとの発生数をカウントする場合は、今年の最初の日付から今年の最後の日付までの日付範囲を指定します。 1/1/1990 〜へ 12/31/1990.
(2)9年14月1985日など、指定した日付で発生数をカウントするには、次のスクリーンショットのように[特定のセルの選択]ダイアログボックスで設定を指定するだけです。


デモ:Excelの日付、平日、月、年、または日付範囲によるカウント


Kutools for Excel: 300 を超える便利なツールをすぐに利用できます。 機能制限なしの 30 日間の無料トライアルを今すぐ始めてください。 今すぐダウンロード!


関連記事:

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

🤖 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 (33)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi;

I need to determin how many times I need Know per week of the year how many time i nedd to see a patient , knowing de lenght of stay and the frequency of observation, 3 in the days ,
exemple :
patiente ex: date of admission : 8/3/2023 date of discharge : 31/8/2023 ; observations 3 in 3 days .
This comment was minimized by the moderator on the site
Hi, I need a formula to count how many times the country of El Salvador appears by Month (how many in Jan, how many if Feb, and how many in March)

1/10/2022 El Saldavor
1/11/2022 USA
1/12/2022 El Salvador
02/01/2022 El Salvador
02/06/2022 Mexico
02/05/2022 USA
03/03/2022 El Salvador
03/03/2022 El Savlador
03/03/2022 USA
This comment was minimized by the moderator on the site
Hi there,

You can add a helper column first with the formula =MONTH(data_cell) to convert the dates to corresponding month numbers. And then use a COUNTIFS formula to get the count of "El Salvador" for each month number.

For example, to get the number of El Salvador appears in January, use: =COUNTIFS(country_list,"El Salvador",helper-column,1)

Please see the picture below:
https://www.extendoffice.com/images/stories/comments/ljy-picture/count_items_by_month.png

Amanda
This comment was minimized by the moderator on the site
Προσπαθω να μετρήσω μια σιγκεκριμένη ημερομηνία αλλα τον τυπο που έχεται παραπάνω δεν το δέχεται το excel =COUNTIF(B2:B15,"1992-8-16")
This comment was minimized by the moderator on the site
Hi there,

Is it becase of the language your Excel version? Please check if COUNTIF should be converted to your language in your Excel verion. Also, when you say Excel does not accept the formula, did Excel show any errors or anything?

Amanda
This comment was minimized by the moderator on the site
01/03/2022 27/08/2022
02/02/2022 31/07/2022
01/04/2022 01/07/2022
01/04/2022 30/06/2022
01/04/2022 30/06/2022
30/04/2022 29/05/2022
20/04/2022 19/05/2022
15/04/2022 14/05/2022
15/04/2022 14/05/2022
15/04/2022 14/05/2022
04/04/2022 03/05/2022
01/02/2022 01/05/2022
13/04/2022 27/04/2022
16/04/2022 24/04/2022
04/04/2022 23/04/2022
15/04/2022 20/04/2022
21/03/2022 19/04/2022
11/04/2022 17/04/2022
05/04/2022 14/04/2022
15/03/2022 13/04/2022
15/03/2022 13/04/2022
15/03/2022 13/04/2022
15/03/2022 13/04/2022
15/03/2022 13/04/2022
15/03/2022 13/04/2022
15/03/2022 13/04/2022
15/03/2022 13/04/2022
15/03/2022 13/04/2022
22/03/2022 10/04/2022
27/03/2022 05/04/2022
29/03/2022 04/04/2022
03/01/2022 03/04/2022
03/01/2022 03/04/2022
03/01/2022 03/04/2022
25/03/2022 03/04/2022

Como contar apenas os dias do mês 04 nesses intervalos?
This comment was minimized by the moderator on the site
Hi, are you trying to count the number of days in April?
If yes, you should first select the two columns, then go to Kutools tab, in the Ranges & Cells group, click To Actual. Now, in the Editing group, click Select, and then click Select Specific Cells.
In the pop-up dialog box, select Cell option under the Selction Type; Under Specific type, select Contains, and type 4/2022 in the corresponding box. Click OK. Now, it will tell you how many days of April are there. Please see screenshot.
This comment was minimized by the moderator on the site
i need report weekly wise like a 7th 14th 21st 28th count only.other days are no need for every month i tried many pivot but i can't find out please help me.
This comment was minimized by the moderator on the site
Why we cant justselect whole column, instead of using this MONTH(C3:C16) ?
This comment was minimized by the moderator on the site
In the formula =SUMPRODUCT(1*(MONTH(C3:C16)=G2)), G2 is the specified month number, says 4. If we replace MONTH(C3:C16) with the whole columns (or C3:C16), there is no value that equal to the value 4, therefore we cannot get the count result.
This comment was minimized by the moderator on the site
What would you do if you have 1 column of events within a date range and need to count if those events had a date in another column?

Example: I have column B as the event dates which vary each month. Column D has the date they came into a consultation. I'm trying to count how many people from that specific event for a date range came to a consultation for any date.
This comment was minimized by the moderator on the site
Hi Roxie,
You should try the Compare cells feature, which can compare two columns of cells, find out, and highlight the exactly same cells between them or the differences. https://www.extendoffice.com/product/kutools-for-excel/excel-compare-two-cells-of-equal.html
This comment was minimized by the moderator on the site
JAN = 1
FEB = 2
..
..
DEC = 12 ? NOT CORRECT RESULT IN DECEMBER
This comment was minimized by the moderator on the site
Hi Rhon,
Could you describe more about the error? Does the error come out when converting December to 12, or when counting by “12”?
This comment was minimized by the moderator on the site
How can I count a cell on a specific day of the week. For example, I want to find a number of something on the first Sunday of the month
This comment was minimized by the moderator on the site
Hi mary,
In your case, you should count by the specified date. For example, count by the first Sunday of Jan, 2019 (in other words 2019/1/6), you can apply the formula =COUNTIF(E1:E16,"2019/1/6")
This comment was minimized by the moderator on the site
rumus ini = SUMPRODUCT (1 * (YEAR (B2: B15) = 1988)) kalau datanya (range) sampe 20ribu ko ga bisa ya?
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