Բաց թողնել հիմնական բովանդակությունը

Ինչպե՞ս հաշվարկել Excel- ում կեսգիշերից հետո ժամերի միջև:

Doc- ը հաշվարկի մեկ գիշերվա անցած ժամանակը 1

Ենթադրելով, որ դուք ունեք ժամանակի աղյուսակ ձեր աշխատանքային ժամանակը գրանցելու համար, սյունակում A- ն այսօրվա մեկնարկի ժամանակն է, իսկ B սյունակում ՝ հաջորդ օրվա ավարտի ժամանակը: Սովորաբար, եթե դուք հաշվարկեք ժամանակի տարբերությունը երկու անգամների միջև ուղղակիորեն մինուս «= B2-A2» - ով, ապա այն չի ցուցադրի ճիշտ արդյունքը, ինչպես ցույց է տրված ձախ սքրինշոթը: Ինչպե՞ս կարող եք ճիշտ հաշվարկել Excel- ում կեսգիշերից հետո երկու անգամ ընկած ժամերը:

Հաշվարկել ժամերը կեսգիշերից հետո երկու անգամ ընկած ժամանակահատվածում բանաձևով


նետ կապույտ աջ պղպջակ Հաշվարկել ժամերը կեսգիշերից հետո երկու անգամ ընկած ժամանակահատվածում բանաձևով

Կեսգիշերին երկու անգամ ճիշտ հաշվարկված արդյունք ստանալու համար կարող եք կիրառել հետևյալ բանաձևը.

1, Մուտքագրեք այս բանաձևը. =(B2-A2+(B2<A2))*24 (A2 ավելի վաղ ժամանակն է, B2 ավելի ուշ ժամանակն է, կարող եք դրանք փոխել ըստ անհրաժեշտության) դատարկ բջիջի, որը բացի ձեր ժամանակի տվյալներից, տես նկարի նկարը.

Doc- ը հաշվարկի մեկ գիշերվա անցած ժամանակը 2

2, Դրանից հետո քաշեք լրացման բռնակը դեպի այն բջիջները, որոնք ցանկանում եք լրացնել այս բանաձևը, և ​​կեսգիշերից հետո երկու անգամների ժամանակային տարբերությունները միանգամից հաշվարկվել են, տե՛ս նկարը.

Doc- ը հաշվարկի մեկ գիշերվա անցած ժամանակը 3

Գրասենյակի արտադրողականության լավագույն գործիքները

🤖 Kutools AI օգնականՀեղափոխություն կատարել տվյալների վերլուծության հիման վրա՝ Խելացի կատարում   |  Ստեղծեք ծածկագիր  |  Ստեղծեք հատուկ բանաձևեր  |  Վերլուծել տվյալները և ստեղծել գծապատկերներ  |  Invoke Kutools-ի գործառույթները...
Հանրաճանաչ հատկություններ: Գտեք, ընդգծեք կամ նույնականացրեք կրկնօրինակները   |  Deleteնջել դատարկ շարքերը   |  Միավորել սյունակները կամ բջիջները՝ առանց տվյալների կորստի   |   Կլոր առանց բանաձևի ...
Super Փնտրել: Բազմաթիվ չափանիշների VLookup    Բազմակի արժեք VLookup  |   VLookup բազմաթիվ թերթերում   |   Fuzzy Փնտրել ....
Ընդլայնված բացվող ցուցակ: Արագ ստեղծեք բացվող ցուցակը   |  Կախված բացվող ցուցակ   |  Բազմակի ընտրություն Drop Down ցուցակ ....
Սյունակի կառավարիչ: Ավելացրեք որոշակի քանակությամբ սյունակներ  |  Տեղափոխել սյունակները  |  Փոխարկել թաքնված սյունակների տեսանելիության կարգավիճակը  |  Համեմատեք միջակայքերը և սյունակները ...
Առանձնահատկություններ: Ցանցի կենտրոնացում   |  Դիզայնի տեսք   |   Մեծ Formula Bar    Աշխատանքային գրքույկի և թերթիկների կառավարիչ   |  Ռեսուրսների գրադարան (Ավտոմատ տեքստ)   |  Ամսաթիվ ընտրող   |  Միավորել աշխատանքային թերթերը   |  Գաղտնագրել/գաղտնազերծել բջիջները    Ուղարկեք նամակներ ըստ ցանկի   |  Սուպեր զտիչ   |   Հատուկ զտիչ (զտել թավ/շեղ/շեղված...) ...
Լավագույն 15 գործիքների հավաքածու12 Տեքստ Գործիքներ (Ավելացրեք տեքստ, Հեռացնել նիշերը, ...)   |   50+ Աղյուսակ Տեսակներ (Գանտի աղյուսակը, ...)   |   40+ Գործնական Բանաձեւեր (Հաշվարկել տարիքը ՝ ելնելով ծննդյան տարեդարձից, ...)   |   19 միացում Գործիքներ (Տեղադրեք QR կոդ, Տեղադրեք նկար ուղուց, ...)   |   12 Փոխարկում Գործիքներ (Բառեր համարներ, Արտարժույթի փոխակերպումը, ...)   |   7 Միաձուլում և պառակտում Գործիքներ (Ընդլայնված կոմբինատ տողեր, Պառակտված բջիջներ, ...)   |   ... եւ ավելին

Լրացրեք ձեր Excel-ի հմտությունները Kutools-ի հետ Excel-ի համար և փորձեք արդյունավետությունը, ինչպես երբեք: Kutools-ը Excel-ի համար առաջարկում է ավելի քան 300 առաջադեմ առանձնահատկություններ՝ արտադրողականությունը բարձրացնելու և ժամանակ խնայելու համար:  Սեղմեք այստեղ՝ Ձեզ ամենաշատ անհրաժեշտ հատկանիշը ստանալու համար...

Նկարագրություն


Office Tab- ը Tabbed ինտերֆեյսը բերում է Office, և ձեր աշխատանքը շատ ավելի դյուրին դարձրեք

  • Միացնել ներդիրներով խմբագրումը և ընթերցումը Word, Excel, PowerPoint- ով, Հրատարակիչ, Access, Visio և Project:
  • Բացեք և ստեղծեք բազմաթիվ փաստաթղթեր նույն պատուհանի նոր ներդիրներում, այլ ոչ թե նոր պատուհաններում:
  • Բարձրացնում է ձեր արտադրողականությունը 50%-ով և նվազեցնում մկնիկի հարյուրավոր սեղմումները ձեզ համար ամեն օր:
Comments (23)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi All,

So I have a list of employees, all their working dates with start and end time & date.

I need to figure out how many hours were spent after midnight- night hours. The issue is that there are all sort of starting and finish times- some of the shifts were day shift the others started at 9pm till 2am, others started 10pm till next morning 5 am, etc.

Is there a way of calculating this using a generic formula for all lines?

I have tried so many variations but excel does not want to collaborate!
This comment was minimized by the moderator on the site
Hello, Timea,
In fact, the formula in this article can solve your problem, see below screenshot:
https://www.extendoffice.com/images/stories/comments/comment-skyyang/2023-comment/doc-calculate-hours.png
Please have a try, thank you!
This comment was minimized by the moderator on the site
Thank you for your reply.

I only want to know the hours worked after midnight, so only the night hours.
Not total hours worked.
Hope this makes sense.
This comment was minimized by the moderator on the site
Hello, Timea
If you just need to get the hours worked after midnight, the below formula may help you:
=IF(DAYS(B2,A2)>0,(B2-A2+(B2<A2))*24,"")
Please try, hope it can help you!
This comment was minimized by the moderator on the site
Very clever, using the comparison (b2<a2) to return a boolean result so if it's after midnight it adds 1.  It took me a minute to understand what you did it was so elegant. 
This comment was minimized by the moderator on the site
Hello,
You are welcome. Glad it helps. Any questions, please feel free to contact us. Have a great day.
Sincerely,
Mandy
This comment was minimized by the moderator on the site
This doesn't work with all data. The solution I tried after trying the above was =IF(B22>C22,(C22-0)+(24-B22),C22-B22)
This comment was minimized by the moderator on the site
=IF(B22>C22,(C22-0)+(24-B22),C22-B22) is perfect but instead of ( , ) use ( ; )
thankyouverymuch
This comment was minimized by the moderator on the site
Doesn't work for me... Formula incorrect.
This comment was minimized by the moderator on the site
Great solution, very useful! Thanks :)
This comment was minimized by the moderator on the site
Hi, i need help please. I have data that auto loads daily at 5pm. The process is broken into 2 parts (ETL1 and ETL2). ETL1 starts at 5pm till 11pm and ETL2 starts at 11 till 4 am. at 7 am i run a script to check if everything ran. each row has a start and end date time. i would like to flag all data after 5pm yesterday as todays data. Currently when i filter on today, i only see the rows where the date is after 00:00
This comment was minimized by the moderator on the site
Can someone explain when the function of addition of the TRUE/FALSE values does so I can understand the formula please?
This comment was minimized by the moderator on the site
True = 1, False = 0
This comment was minimized by the moderator on the site
I think a simple MOD(B2-A2,1) should be enough?
This comment was minimized by the moderator on the site
This is undoubtedly the best and shortest solution.
This comment was minimized by the moderator on the site
Austin, the formula stated in the article above works well for me
This comment was minimized by the moderator on the site
The formula under bullet point #1 is wrong. =(B2-A2+(B2<A2))*24, but is should read as =B2-A2+(B2<A2)*24.

The parentheses are in the wrong spot.
This comment was minimized by the moderator on the site
THANK YOU! This is definitely the correct formula.
This comment was minimized by the moderator on the site
Yes Austin! Your formula works, the other formula renders nonsense (in my case). Thanks!!
This comment was minimized by the moderator on the site
No, Austin's correction works for me. The original with the parentheses where they are shown does not work. Maybe a diifferent version of Excel makes a difference? I am on MS Home and Office 2016
This comment was minimized by the moderator on the site
The original formula works better than your suggestion Austin.
I also used =(A2-B2+(A2<B2))*1440
This worked best to convert time into minutes.
This comment was minimized by the moderator on the site
Depois de colocar a formatação ao tentar somar a coluna total de horas o valor dá-me errado.

O campo é formatado [h]mm
This comment was minimized by the moderator on the site
=(A2-B2+(A2)) sem utilizar a multiplicação por 24
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations