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

วิธีคำนวณความแตกต่างของเวลาระหว่างสองครั้งหรือวันที่?

หากคุณมีรายการเวลาสองรายการเช่นคอลัมน์ A และคอลัมน์ B (เวลาในคอลัมน์ A อยู่ก่อนหน้าคอลัมน์ B ในแถวเดียวกัน) ดังที่แสดงในภาพหน้าจอด้านล่างและคุณจะไม่ได้เวลาที่ถูกต้องแตกต่างจากการลบเวลาในภายหลัง ช่วงแรก ตอนนี้ฉันพูดถึงวิธีการคำนวณความแตกต่างของเวลาใน Excel


ลูกศรสีฟ้าฟองขวา คำนวณความแตกต่างของเวลาระหว่างสองครั้งใน Excel

ในกรณีของเราเราสมมติว่ามีเพียงชั่วโมงนาทีและวินาทีในสองคอลัมน์และเวลาในคอลัมน์ A จะเร็วกว่าคอลัมน์ B ในแถวเดียวกันเสมอ

1. เลือกเซลล์ว่างในกรณีนี้ฉันเลือกเซลล์ C2 พิมพ์สูตรนี้ = B2-A2 + (A2> B2) (เวลาในเซลล์ A2 เร็วกว่าเซลล์ B2 คุณสามารถเปลี่ยนได้ตามต้องการ) กด เข้าสู่ จากนั้นลากจุดจับเติมเพื่อเติมช่วงที่จำเป็นในการใช้สูตรนี้ ดูภาพหน้าจอ:

2. เลือกช่วงผลลัพธ์ในกรณีนี้ให้เลือกช่วงผลลัพธ์ C2: C6 แล้วคลิกขวา> จัดรูปแบบเซลล์ ในเมนูบริบท ดูภาพหน้าจอ:

3 ใน จัดรูปแบบเซลล์ โต้ตอบคลิก จำนวน แท็บ> เวลาแล้วเลือกรูปแบบเวลาที่คุณต้องการจากส่วนด้านขวาคลิก OK. ดูภาพหน้าจอ:

จากนั้นคุณจะเห็นความแตกต่างของเวลาที่คำนวณได้ดังที่แสดงด้านล่าง:


ลูกศรสีฟ้าฟองขวา คำนวณความแตกต่างของเวลาระหว่างวันที่สองวันใน Excel

หากไม่มีเพียงชั่วโมงนาทีและวินาทีเท่านั้น แต่ยังมีวันที่ในคอลัมน์ด้วยคุณสามารถทำได้ดังนี้:

1. เลือกเซลล์ว่างในกรณีนี้ฉันเลือกเซลล์ C2 พิมพ์สูตรนี้ = B2-A2 (เวลาในเซลล์ A2 เร็วกว่าเซลล์ B2 คุณสามารถเปลี่ยนได้ตามต้องการ) กด เข้าสู่ จากนั้นลากจุดจับเติมเพื่อเติมช่วงที่จำเป็นในการใช้สูตรนี้ ดูภาพหน้าจอ:

2. เลือกช่วงผลลัพธ์ในกรณีนี้เลือกช่วง C2: C6 แล้วคลิกขวา> จัดรูปแบบเซลล์ ในเมนูบริบท ดูภาพหน้าจอ:

3 ใน จัดรูปแบบเซลล์ โต้ตอบคลิก จำนวน แท็บ> เวลาและเลือก 37:30:55 จาก ชนิดภาพเขียน คลิกที่ OK. ดูภาพหน้าจอ:

จากนั้นคุณจะเห็นความแตกต่างของเวลาที่คำนวณได้ดังที่แสดงด้านล่าง:


ลูกศรสีฟ้าฟองขวา คำนวณความแตกต่างของเวลาระหว่างวันที่สองวันด้วย Kutools for Excel

หากคุณต้องการคำนวณความแตกต่างของเวลาและแสดงผลต่างของเวลาที่คำนวณได้เป็นคำ (3 ชั่วโมง 5 นาที 12 วินาที) คุณสามารถใช้ปุ่ม ตัวช่วยวันที่และเวลา ประโยชน์ของ Kutools สำหรับ Excel.

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

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

1. เลือกเซลล์ที่จะกำหนดความแตกต่างของเวลาคลิก Kutools > ตัวช่วยสูตร > ตัวช่วยวันที่และเวลาดูภาพหน้าจอ:
ความแตกต่างของเวลา doc kte 1

2. ในกล่องโต้ตอบ popping ให้เลือก ความแตกต่าง จากนั้นเลือกสองครั้งในช่อง การป้อนอาร์กิวเมนต์ กล่องข้อความแยกกันให้เลือกประเภท disply ตามที่คุณต้องการในรายการแบบเลื่อนลงของ ประเภทผลลัพธ์เอาต์พุตดู screeshot:
doc kutools ตัวช่วยวันเวลา 2

3. คลิกตกลงจากนั้นผลลัพธ์แรกปรากฏขึ้นลากจุดจับเติมอัตโนมัติบนเซลล์เพื่อคำนวณความแตกต่างของเวลาทั้งหมด
doc kutools ตัวช่วยวันเวลา 3 doc kutools ตัวช่วยวันเวลา 4


บทความญาติ:

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

🤖 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 (21)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
how to calculate difference for the below scenario


4/8/2019 10:18:22 AM

4/8/2019 6:10:01 PM

please help me..
This comment was minimized by the moderator on the site
Hi, prasad nalliri, just use one date to minus another date, then format the result (a number string) as a date or time format as you need:
A1 4/8/2019 10:18:22 AM

A2 4/8/2019 6:10:01 PM
Using this formula in B1: ==ABS(A1-A2)
Result: 0.327534722
Format the result as time or date
This comment was minimized by the moderator on the site
Hi there, I know how to calculate the difference between a start and finish time. However, I would like to know what is the formula when I also want to minus a target date Is there such a formula?



example: start date: 10/29/17 12:00 AM

A. 1st transaction date: 10/28/17 03:22 PM
B. end of 1st transaction date: 10/30/17 01:13 PM


if Column A is not equal to 10/29/17 12:00am then excess hours should be subtracted from the accumulated hrs from A and B
This comment was minimized by the moderator on the site
Sorry, Could you give a compliacted instance? Through your description, I do not understand clearly.
This comment was minimized by the moderator on the site
Hi there, I know how to calculate the difference between a start and finish time. However, I would like to know what the formula is when I also want to minus 30minutes. Is there such a formula?
This comment was minimized by the moderator on the site
Thanks for your leaving massage, you can try this formula =A1-TIME(0,30,0). See screenshot:
This comment was minimized by the moderator on the site
Hi team, i want to caluculate the time difference in the same cell ans the working hours should be come in next colum for example under timings 9:00am-06:00pm is there i want to know the working time in hours for example like 8 hrs or 9 hours like that. Sample: Timings Hours 09:15 AM - 06:15 PM
This comment was minimized by the moderator on the site
I want to highlight the late comers time by getting the difference of exceed time(late time) with the actual time For ex: if the actual time is 8.00AM if anyone comes by 8.30AM ,the time difference be 0.30minutes .. How can i highlight that 30 minutes using conditional formating in excel? or is there any options to highlight that?
This comment was minimized by the moderator on the site
I am having A1 cell : 04/14/2016 11:15:43 and B2 cell : 03/31/2016 10:41:23 Please let me know the time duration in hrs of between two difference date. exmple refno reg_code status cpv_incoming_date CPV Out CPV Out Time WH CPV IN WH CPV IN time Range CPV In Time ABC A B 09-MAY-2016,14:00:50 10-May-16 16:06:59 10-May-16 9:30:00 >6 hrs and < 8 Hrs 9-May-16 14:00:50
This comment was minimized by the moderator on the site
I am having A1 cell : 04/14/2016 11:15:43 AM and B2 cell : 03/31/2016 10:41:23 AM. Please let me know the time duration in minutes of between two difference date.
This comment was minimized by the moderator on the site
Scenario, Compare the h:mm:ss from the column A1 and display if the value in A2 cell is greater that 15 minutes then display the timing in proper column data condition There is a value in a cell A2, 0:16:38(h:mm:ss) and column B name "
This comment was minimized by the moderator on the site
ENTER EXIT TURN OVER 825 847 913 939 26 1038 1109 59 1133 1153 24 Please can you help me find a formulate to calculate turnover. The difference between Exit to Enter. Thanks.
This comment was minimized by the moderator on the site
Please advise how to convert time result 7.30 to 7.5 hours. Example result shows 7.30 hours different between two that should be total hours 7.5 in the time sheet.
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