ไปยังเนื้อหาหลัก

จะนับตามวันที่ / เดือน / ปีและช่วงวันที่ใน Excel ได้อย่างไร?

ตัวอย่างเช่นเรามีบัญชีรายชื่อสมาชิกพร้อมวันเกิดของพวกเขาและตอนนี้เรากำลังเตรียมทำการ์ดวันเกิดให้กับสมาชิกเหล่านี้ ก่อนที่จะทำการ์ดวันเกิดเราต้องนับจำนวนวันเกิดในเดือน / ปี / วันที่ระบุ ที่นี่ฉันจะแนะนำให้คุณนับตามวันที่ / เดือน / ปีและช่วงวันที่ด้วยสูตรใน Excel ด้วยวิธีการต่อไปนี้:


นับตามเดือน / ปีและช่วงวันที่ที่ระบุด้วยสูตรใน Excel

ในส่วนนี้ฉันจะแนะนำสูตรบางอย่างในการนับวันเกิดตามเดือนปีหรือช่วงวันที่ที่ระบุใน Excel

นับตามหนึ่งเดือน

สมมติว่าคุณกำลังจะนับวันเกิดซึ่งอยู่ในเดือนที่ 8 คุณสามารถป้อนสูตรด้านล่างลงในเซลล์ว่างจากนั้นกด เข้าสู่ กุญแจ

= SUMPRODUCT (1 * (เดือน (C3: C16) = G2))

หมายเหตุ:

ในสูตรข้างต้น C3: C16 คือคอลัมน์วันเดือนปีเกิดที่ระบุซึ่งคุณจะนับวันเกิดและ G2 คือเซลล์ที่มีหมายเลขเดือนที่ระบุ

คุณยังสามารถใช้สูตรอาร์เรย์นี้ = SUM (IF (เดือน (B2: B15) = 8,1)) (กด Ctrl + Shift + Enter คีย์) เพื่อนับวันเกิดตามเดือนที่ระบุ

นับตามปีที่กำหนด

หากคุณต้องการนับวันเกิดตามปีหนึ่ง ๆ ปี 1988 กล่าวคุณสามารถใช้สูตรใดสูตรหนึ่งด้านล่างได้ตามต้องการ

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

หมายเหตุ: สูตรที่สองคือสูตรอาร์เรย์ โปรดอย่าลืมกดปุ่ม 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) โปรดใช้สูตรด้านล่าง:

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

หมายเหตุริบบิ้น สูตรซับซ้อนเกินไปที่จะจำ? บันทึกสูตรเป็นรายการข้อความอัตโนมัติเพื่อใช้ซ้ำได้ในคลิกเดียวในอนาคต!
อ่านเพิ่มเติม ...     ทดลองใช้ฟรี

นับได้อย่างง่ายดาย ปีบัญชีครึ่งปีหมายเลขสัปดาห์หรือวันในสัปดาห์ใน Excel

คุณลักษณะการจัดกลุ่มเวลาพิเศษของ PivotTable ซึ่งจัดทำโดย Kutools for Excel สามารถเพิ่มคอลัมน์ตัวช่วยเพื่อคำนวณปีบัญชีครึ่งปีจำนวนสัปดาห์หรือวันในสัปดาห์ตามคอลัมน์วันที่ที่ระบุและช่วยให้คุณสามารถนับผลรวมได้อย่างง่ายดาย หรือคอลัมน์ค่าเฉลี่ยตามผลลัพธ์จากการคำนวณใน Pivot Table ใหม่


Kutools สำหรับ Excel - เพิ่มประสิทธิภาพ Excel ด้วยเครื่องมือที่จำเป็นมากกว่า 300 รายการ เพลิดเพลินกับฟีเจอร์ทดลองใช้ฟรี 30 วันโดยไม่ต้องใช้บัตรเครดิต! Get It Now

นับตามวันที่ปีหรือช่วงวันที่ที่ระบุใน Excel

หากคุณติดตั้ง Kutools for Excel ไว้คุณสามารถใช้ไฟล์ เลือกเซลล์เฉพาะ ยูทิลิตี้ในการนับจำนวนครั้งที่เกิดขึ้นตามวันที่ปีหรือช่วงวันที่ที่ระบุใน Excel ได้อย่างง่ายดาย

Kutools สำหรับ Excel- รวมเครื่องมือที่มีประโยชน์มากกว่า 300 รายการสำหรับ Excel ทดลองใช้ฟรี 30 วัน ไม่ต้องใช้บัตรเครดิต! Get It Now

1. เลือกคอลัมน์วันเกิดที่คุณจะนับแล้วคลิก Kutools > เลือก > เลือกเซลล์เฉพาะ. ดูภาพหน้าจอ:

2. ในการเปิดกล่องโต้ตอบเลือกเซลล์เฉพาะโปรดทำตามภาพด้านบนที่แสดง:
(1) ใน ประเภทการเลือก โปรดเลือกหนึ่งตัวเลือกตามที่คุณต้องการ ในกรณีของเราเราตรวจสอบไฟล์ เซลล์ ตัวเลือก;
(2) ใน ประเภทเฉพาะ เลือก มากกว่าหรือเท่ากับ จากรายการแบบเลื่อนลงรายการแรกจากนั้นพิมพ์วันที่แรกของช่วงวันที่ที่ระบุในกล่องด้านขวา ถัดไปเลือกไฟล์ น้อยกว่าหรือเท่ากับ จากรายการแบบเลื่อนลงที่สองและพิมพ์วันที่สุดท้ายของช่วงวันที่ที่ระบุในกล่องด้านขวาจากนั้นเลือก และ ตัวเลือก;
(3) คลิกไฟล์ Ok ปุ่ม

3. ตอนนี้กล่องโต้ตอบจะปรากฏขึ้นและแสดงจำนวนแถวที่ถูกเลือกตามภาพด้านล่างที่แสดง กรุณาคลิกที่ไฟล์ OK เพื่อปิดกล่องโต้ตอบนี้

หมายเหตุ:
(1) สำหรับการนับจำนวนครั้งที่เกิดขึ้นตามปีที่ระบุให้ระบุช่วงวันที่ตั้งแต่วันแรกของปีนี้ถึงวันสุดท้ายของปีนี้เช่นจาก 1/1/1990 ไปยัง 12/31/1990.
(2) สำหรับการนับจำนวนครั้งที่เกิดขึ้นตามวันที่ระบุเช่น 9/14/1985 เพียงระบุการตั้งค่าในกล่องโต้ตอบเลือกเซลล์เฉพาะตามภาพด้านล่างที่แสดง:


Demo: นับตามวันที่วันธรรมดาเดือนปีหรือช่วงวันที่ใน Excel


Kutools สำหรับ Excel: เครื่องมือแสนสะดวกกว่า 300 รายการอยู่แค่เพียงปลายนิ้วสัมผัส! เริ่มทดลองใช้ฟรี 30 วันโดยไม่มีข้อจำกัดด้านฟีเจอร์ตั้งแต่วันนี้ Download Now!


บทความที่เกี่ยวข้อง:

สุดยอดเครื่องมือเพิ่มผลผลิตในสำนักงาน

🤖 Kutools AI ผู้ช่วย: ปฏิวัติการวิเคราะห์ข้อมูลโดยยึดตาม: การดำเนินการที่ชาญฉลาด   |  สร้างรหัส  |  สร้างสูตรที่กำหนดเอง  |  วิเคราะห์ข้อมูลและสร้างแผนภูมิ  |  เรียกใช้ฟังก์ชัน Kutools...
คุณสมบัติยอดนิยม: ค้นหา เน้น หรือระบุรายการที่ซ้ำกัน   |  ลบแถวว่าง   |  รวมคอลัมน์หรือเซลล์โดยไม่สูญเสียข้อมูล   |   รอบโดยไม่มีสูตร ...
การค้นหาขั้นสูง: VLookup หลายเกณฑ์    VLookup หลายค่า  |   VLookup ข้ามหลายแผ่น   |   การค้นหาที่ไม่ชัดเจน ....
รายการแบบเลื่อนลงขั้นสูง: สร้างรายการแบบหล่นลงอย่างรวดเร็ว   |  รายการแบบหล่นลงขึ้นอยู่กับ   |  เลือกหลายรายการแบบหล่นลง ....
ผู้จัดการคอลัมน์: เพิ่มจำนวนคอลัมน์เฉพาะ  |  ย้ายคอลัมน์  |  สลับสถานะการมองเห็นของคอลัมน์ที่ซ่อนอยู่  |  เปรียบเทียบช่วงและคอลัมน์ ...
คุณสมบัติเด่น: กริดโฟกัส   |  มุมมองการออกแบบ   |   บาร์สูตรใหญ่    สมุดงานและตัวจัดการชีต   |  ห้องสมุดทรัพยากร (ข้อความอัตโนมัติ)   |  เลือกวันที่   |  รวมแผ่นงาน   |  เข้ารหัส/ถอดรหัสเซลล์    ส่งอีเมลตามรายการ   |  ซุปเปอร์ฟิลเตอร์   |   ตัวกรองพิเศษ (กรองตัวหนา/ตัวเอียง/ขีดทับ...) ...
ชุดเครื่องมือ 15 อันดับแรก12 ข้อความ เครื่องมือ (เพิ่มข้อความ, ลบอักขระ, ... )   |   50 + แผนภูมิ ประเภท (แผนภูมิ Gantt, ... )   |   40+ ใช้งานได้จริง สูตร (คำนวณอายุตามวันเกิด, ... )   |   19 การแทรก เครื่องมือ (ใส่ QR Code, แทรกรูปภาพจากเส้นทาง, ... )   |   12 การแปลง เครื่องมือ (ตัวเลขเป็นคำ, การแปลงสกุลเงิน, ... )   |   7 ผสานและแยก เครื่องมือ (แถวรวมขั้นสูง, แยกเซลล์, ... )   |   ... และอื่น ๆ

เพิ่มพูนทักษะ Excel ของคุณด้วย Kutools สำหรับ Excel และสัมผัสประสิทธิภาพอย่างที่ไม่เคยมีมาก่อน Kutools สำหรับ Excel เสนอคุณสมบัติขั้นสูงมากกว่า 300 รายการเพื่อเพิ่มประสิทธิภาพและประหยัดเวลา  คลิกที่นี่เพื่อรับคุณสมบัติที่คุณต้องการมากที่สุด...

รายละเอียด


แท็บ Office นำอินเทอร์เฟซแบบแท็บมาที่ Office และทำให้งานของคุณง่ายขึ้นมาก

  • เปิดใช้งานการแก้ไขและอ่านแบบแท็บใน Word, Excel, PowerPoint, ผู้จัดพิมพ์, Access, 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