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

วิธีแยกบันทึกทั้งหมดระหว่างวันที่สองวันใน Excel

นี่คือช่วงของข้อมูลใน Excel และในกรณีนี้ฉันต้องการแยกระเบียนแถวทั้งหมดระหว่างวันที่สองวันดังที่แสดงด้านล่างภาพหน้าจอคุณมีแนวคิดในการจัดการงานนี้อย่างรวดเร็วโดยไม่ต้องค้นหาข้อมูลและแยกทีละรายการด้วยตนเองหรือไม่?

doc แยกบันทึกระหว่างวันที่ 1 ลูกศรยิงไปทางขวา doc แยกบันทึกระหว่างวันที่ 2

แยกระเบียนทั้งหมดระหว่างวันที่สองวันตามสูตร

แยกระเบียนทั้งหมดระหว่างวันที่สองวันโดย Kutools for Excelความคิดที่ดี 3


แยกระเบียนทั้งหมดระหว่างวันที่สองวันตามสูตร

ในการแยกระเบียนทั้งหมดระหว่างวันที่สองวันใน Excel คุณต้องทำดังนี้:

1. สร้างแผ่นงานใหม่ Sheet2 และพิมพ์วันที่เริ่มต้นและวันที่สิ้นสุดในสองเซลล์เช่น A1 และ B1 ดูภาพหน้าจอ:
doc แยกบันทึกระหว่างวันที่ 3

2. ใน C1 ใน Sheet2 พิมพ์สูตรนี้ =SUMPRODUCT((Sheet1!$A$2:$A$22>=A2)*(Sheet1!$A$2:$A$22<=B2))กด เข้าสู่ คีย์เพื่อนับจำนวนแถวที่ตรงกันทั้งหมด ดูภาพหน้าจอ:
doc แยกบันทึกระหว่างวันที่ 4

หมายเหตุ ในสูตร Sheet1 คือแผ่นงานที่มีข้อมูลต้นฉบับที่คุณต้องการดึงออกมา $ A $ 2: $ A $ 22 คือช่วงของข้อมูล A2 และ B2 คือวันที่เริ่มต้นและวันที่สิ้นสุด

3. เลือกเซลล์ว่างที่คุณจะวางข้อมูลที่แยกแล้วพิมพ์สูตรนี้ =IF(ROWS(A$5:A5)>$C$2,"",INDEX(Sheet1!A$2:A$22,SMALL(IF((Sheet1!$A$2:$A$22>=$A$2)*(Sheet1!$A$2:$A$22<=$B$2),ROW(Sheet1!A$2:A$22)-ROW(Sheet1!$A$2)+1),ROWS(A$5:A5))))กด Shift + Ctrl + Enter และลากจุดจับเติมอัตโนมัติเหนือคอลัมน์และแถวเพื่อดึงข้อมูลทั้งหมดออกมาจนกระทั่งเซลล์ว่างหรือค่าศูนย์ปรากฏ ดูภาพหน้าจอ:
doc แยกบันทึกระหว่างวันที่ 5

4. ลบเลขศูนย์และเลือกวันที่ที่แสดงเป็นตัวเลข 5 หลักไปที่ หน้าแรก และเลือก วันที่สั้น ในรายการดรอปดาวน์ทั่วไปเพื่อจัดรูปแบบในการจัดรูปแบบวันที่ ดูภาพหน้าจอ:
doc แยกบันทึกระหว่างวันที่ 6


แยกระเบียนทั้งหมดระหว่างวันที่สองวันโดย Kutools for Excel

หากคุณต้องการจัดการงานนี้ได้ง่ายขึ้นคุณสามารถลองใช้คุณลักษณะ Select Specific Cells ของ Kutools for Excel

Kutools สำหรับ Excel, ที่มีมากกว่า 300 ฟังก์ชั่นที่มีประโยชน์ทำให้งานของคุณง่ายขึ้น 

หลังจากการติดตั้ง Kutools สำหรับ Excel โปรดทำดังนี้:(ดาวน์โหลด Kutools for Excel ฟรีทันที!)

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

2 ใน เลือกเซลล์เฉพาะ โต้ตอบตรวจสอบ ทั้งแถว ตัวเลือกและเลือก มากกว่า และ น้อยกว่า จากรายการแบบเลื่อนลงพิมพ์วันที่เริ่มต้นและวันที่สิ้นสุดลงในกล่องข้อความอย่าลืมตรวจสอบ และ. ดูภาพหน้าจอ:
doc แยกบันทึกระหว่างวันที่ 8

3 คลิก Ok > OK. และเลือกแถวที่ตรงกับวันที่แล้ว กด Ctrl + C เพื่อคัดลอกแถวและเลือกเซลล์ว่างแล้วกด Ctrl + V เพื่อวางดูภาพหน้าจอ:
doc แยกบันทึกระหว่างวันที่ 9

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

🤖 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 (19)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi, this formula worked ok, except it only returned one data set for each date in the range. Is there an adjustment to allow for multiple entries with the dame date value?
This comment was minimized by the moderator on the site
This formula works awesome thanks, I need some extra help though. I have 200 employees, each with certification that expires on different dates. The heading for each certification is at the top with their expiry dates below. I want to extract the rows that with all info if there is an expiry reached and throw them into a new sheet. Exactly like the example above just dated from multiple columns.
This comment was minimized by the moderator on the site
Hi, Christiaan82, could you upload the a screenshot about you workhsheet, or give me more details about the information of sheet format, only with your description, I do not get it clearly.
This comment was minimized by the moderator on the site
All sorted. Instead of trying to retrieve the rows from multiple columns, I added a new hidden sheet where all the info populates the info on top of each other. So the information only needs to be retrieved from one column, as per your example above.
Thank you Sunny
This comment was minimized by the moderator on the site
"drag Auto fill handle over columns and rows to extract all data until blank cells or zero values appear."
This doesn't seem to be working for me. The first row gives me the dates but the same gets repeated in the next two rows.
This comment was minimized by the moderator on the site
Hi, Neha, could you check if your auto calculate is turn on? Click Formulas > Calcuations Options > Automatic.
This comment was minimized by the moderator on the site
it worked well for single sheet. can u pls help me to get the same from multiple sheets of similar data. first 4 sheets contain similar data. i need all records of same 'date' in sheet5.
This comment was minimized by the moderator on the site
Can you extend the formula to check for dates that encompass more than one day? For example, using the same start and end dates from 1/1/15-12/31/16, but the data in sheet 1 have start and end dates too rather than just existing for a singular date.
This comment was minimized by the moderator on the site
This formula worked brilliantly. I was concerned as I have multiple date duplicates and there was no mention of how it handles those; no issues. It returned all relevant data.
Stoked.
This comment was minimized by the moderator on the site
Thanks for your support, you can combined the duplicate dates cells after extracting.
This comment was minimized by the moderator on the site
The trouble I am having because I need to find dates that run through the date range specified. So I want anything that runs through something like 1/2016 to 12/2017, however it needs to include start dates that may be before the range so I can identify the records I need to look at.
This comment was minimized by the moderator on the site
I used this code and it is pulling up dates outside of the window... how do I fix it?
This comment was minimized by the moderator on the site
Which code Kayla? Do you mean the formula?
This comment was minimized by the moderator on the site
I recreated this example in Excel 2010, and the result was that the first row of data would show up, but everything underneath had a number error.
This comment was minimized by the moderator on the site
Same thing happens to me n Excel 2010. Something in the formula doesn't work correctly.
This comment was minimized by the moderator on the site
Have you pressed Shift + Ctrl + Enter keys?
This comment was minimized by the moderator on the site
I see what's wrong. You have to press the shift + CTRL + Enter keys while still in edit mode.
I was hitting those keys after entering the formula and hitting ENTER.
I wish it would have been clearer.
This comment was minimized by the moderator on the site
Yes, brian, after typing the formula and still in edit mode, directly press Shift + Ctrl + Enter keys (the keys instead of Enter key), to get the correct result.
This comment was minimized by the moderator on the site
Still doesnt work for me? I am doing exactly as above and still returning the NUM error? Any other ideas?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations