Skip i'r prif gynnwys

Sut i drosi llinyn amser yn amser yn Excel?

Er enghraifft, mae gennych chi restr o linyn testun mewn taflen waith, ac nawr mae angen i chi drosi'r tannau testun hyn yn amser neu ddyddiad ac amser, sut allwch chi ei ddatrys? Yma, byddaf yn cyflwyno rhai triciau i chi drosi llinyn testun yn gyflym yn amser yn Excel.

Trosi llinyn testun yn amser

Trosi llinyn testun hyd yn hyn ac amser


swigen dde glas saeth Trosi llinyn testun yn amser

I drosi llinyn testun yn amser, gallwch ddefnyddio rhai fformiwlâu i'w datrys.

1. Dewiswch gell a theipiwch y fformiwla hon = TIMEVALUE (CHWITH (A1, LEN (A1) -2) & ":" & DDE (A1,2)) (A1 yw'r llinyn testun y mae angen i chi ei drosi i amser) i mewn iddo, a gwasgwch Rhowch. Os oes angen, gallwch lusgo'r handlen llenwi i'r ystod sydd ei hangen arnoch. Gweler y screenshot:
doc-amser-llinyn-i-amser-1

2. Yna cliciwch ar y dde ar y celloedd dethol hyn, a dewiswch Celloedd Fformat o'r ddewislen cyd-destun, ac yna yn y Celloedd Fformat deialog, dewiswch amser oddi wrth y Categori rhestr o dan Nifer tab, yna dewiswch y math o amser sydd ei angen arnoch chi.
doc-amser-llinyn-i-amser-2

3. Cliciwch OK, nawr mae llinynnau testun yn cael eu trosi'n amser.
doc-amser-llinyn-i-amser-3

Nodyn:

1. Ni all y fformiwla hon weithio'n gywir wrth linyn testun gan gynnwys eiliadau, fel 120158.

2. Os yw fformat llinyn eich testun yn 120456P, gallwch ddefnyddio'r fformiwla hon =TEXT(--(LEFT(A1,LEN(A1)-1)),"0\:00\:00")+((RIGHT(A1,1)="P")/2), yna fformatiwch y celloedd fel y cloc 12 awr sydd ei angen arnoch chi. Gweler y screenshot:

doc-amser-llinyn-i-amser-4
doc-amser-llinyn-i-amser-5

swigen dde glas saeth Trosi llinyn testun hyd yn hyn ac amser

Os yw'ch llinyn testun yn cynnwys dyddiad ac amser fel 20141212 0312, gallwch ddefnyddio ychydig o fformiwla hir i'w datrys.

1. Yn y gell wag, teipiwch y fformiwla hon =DATE(LEFT(A1,4),MID(A1,5,2),MID(A1,7,2))+TIME(MID(A1,10,2),RIGHT(A1,2),0), ac yna'r wasg Rhowch yn allweddol, os oes angen, gallwch gymhwyso'r fformiwla hon i ystod.

2. Yna cliciwch ar y dde yn y celloedd a ddewiswyd a dewis Celloedd Fformat o'r ddewislen cyd-destun, yna yn y Celloedd Fformat deialog, dewiswch dyddiad oddi wrth y Categori rhestrwch, a dewiswch y math sydd ei angen arnoch o'r adran dde.
doc-amser-llinyn-i-amser-6

3. Cliciwch OK. Nawr gallwch weld y llinyn testun wedi'i drosi hyd yma ac amser.
doc-amser-llinyn-i-amser-7

Awgrym.Os ydych chi am drosi amser i oriau, munudau neu eiliadau degol, ceisiwch ddefnyddio'r Kutools ar gyfer Excel'S Amser Trosi fel y dangosir yn y screenshot canlynol. Mae'n swyddogaeth lawn heb gyfyngiad mewn 30 diwrnod, lawrlwythwch a chael treial am ddim nawr.

Trosi amser yn gyflym i werth degol yn Excel

Er enghraifft, mae gennych chi restr o amser sydd ei angen i drosi oriau, munudau neu eiliadau todecimal, sut allwch chi ei datrys yn Excel yn gyflym ac yn hawdd? Mae'r Amser Trosi of Kutools ar gyfer Excel, yn gallu gwneud ffafr i chi.   Cliciwch am 30 diwrnod o dreial am ddim!
amser trosi doc
 
Kutools ar gyfer Excel: gyda mwy na 300 o ychwanegion Excel defnyddiol, am ddim i geisio heb unrhyw gyfyngiad mewn 30 diwrnod.

Offer Cynhyrchiant Swyddfa Gorau

🤖 Kutools AI Aide: Chwyldro dadansoddi data yn seiliedig ar: Cyflawniad Deallus   |  Cynhyrchu Cod  |  Creu Fformiwlâu Personol  |  Dadansoddi Data a Chynhyrchu Siartiau  |  Invoke Swyddogaethau Kutools...
Nodweddion Poblogaidd: Darganfod, Amlygu neu Adnabod Dyblygiadau   |  Dileu Rhesi Gwag   |  Cyfuno Colofnau neu Gelloedd heb Colli Data   |   Rownd heb Fformiwla ...
Super-edrych: VLookup Meini Prawf Lluosog    VLookup Gwerth Lluosog  |   VLookup Ar Draws Taflenni Lluosog   |   Edrych Niwlog ....
Rhestr gwympo Uwch: Creu Rhestr Gollwng yn Gyflym   |  Rhestr Gollwng Dibynnol   |  Rhestr Gollwng Aml-ddewis ....
Rheolwr Colofn: Ychwanegu Nifer Penodol o Golofnau  |  Symud Colofnau  |  Toglo Statws Gwelededd Colofnau Cudd  |  Cymharwch Ystodau a Cholofnau ...
Nodweddion dan Sylw: Ffocws ar y Grid   |  Golwg Dylunio   |   Bar Fformiwla Mawr    Rheolwr Llyfr Gwaith a Thaflen   |  Llyfrgell Adnoddau (Testun Auto)   |  Dewiswr Dyddiad   |  Cyfuno Taflenni Gwaith   |  Amgryptio/Dadgryptio Celloedd    Anfon E-byst trwy Restr   |  Hidlo Super   |   Hidlo Arbennig (hidlo mewn print trwm/italig/strikethrough...) ...
15 Set Offer Gorau12 Testun offer (Ychwanegu Testun, Dileu Cymeriadau,...)   |   50 + Siart Mathau (Siart Gantt,...)   |   40+ Ymarferol Fformiwlâu (Cyfrifwch oedran yn seiliedig ar ben-blwydd,...)   |   19 mewnosod offer (Mewnosod Cod QR, Mewnosod Llun o'r Llwybr,...)   |   12 Trosi offer (Rhifau i Eiriau, Trosi arian cyfred,...)   |   7 Uno a Hollti offer (Rhesi Cyfuno Uwch, Celloedd Hollt,...)   |   ... a mwy

Supercharge Eich Sgiliau Excel gyda Kutools ar gyfer Excel, a Phrofiad Effeithlonrwydd Fel Erioed Erioed. Kutools ar gyfer Excel Yn Cynnig Dros 300 o Nodweddion Uwch i Hybu Cynhyrchiant ac Arbed Amser.  Cliciwch Yma i Gael Y Nodwedd Sydd Ei Angen Y Mwyaf...

Disgrifiad


Mae Office Tab yn dod â rhyngwyneb Tabbed i Office, ac yn Gwneud Eich Gwaith yn Haws o lawer

  • Galluogi golygu a darllen tabbed yn Word, Excel, PowerPoint, Cyhoeddwr, Mynediad, Visio a Phrosiect.
  • Agor a chreu dogfennau lluosog mewn tabiau newydd o'r un ffenestr, yn hytrach nag mewn ffenestri newydd.
  • Yn cynyddu eich cynhyrchiant 50%, ac yn lleihau cannoedd o gliciau llygoden i chi bob dydd!
Comments (19)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Would love any help with this. I have data that is reported as "1d 01h 01m" representing 1 day, 1 hour, 1 min and I need to be able to represent this as a single number (preferably in # of minutes) any thoughts on how I can convert this string to a number value? Thanks all!
This comment was minimized by the moderator on the site
how to convert 06Hr:11Mi into 06:11
This comment was minimized by the moderator on the site
Hi, abinash kumar, you can remove alpha characters from your time string.
This tutorial can help you:
How to remove alpha characters from cells in Excel?
This comment was minimized by the moderator on the site
how do I convert Date/Time with this text format 08/07/2022 1519
This comment was minimized by the moderator on the site
Hi, Tina, please give me a specific example for explaining and descriping your problem. Thank you.
This comment was minimized by the moderator on the site
Hi there!

I used one of formulas above to convert a time string and it worked beautifully expect for anything that had a format of 1200P. It should convert to 12:00 but instead converts to 00:00. Any thoughts on why or how to fix it?

I used: "120456P, you can use this formula =TEXT(--(LEFT(A1,LEN(A1)-1)),"0\:00\:00")+((RIGHT(A1,1)="P")/2)"

I did not have any seconds in my time string so I deleted the last set of 0's in the formula and it still worked.
This comment was minimized by the moderator on the site
Hi.,I have a query.
I want to convert a duration extracted in a format #h #m #s to duration format so that I can filter it. For example:
My data has a field named Session Duration and the format of the cell is "General" and the cell says "1h 2m 15s". I need to convert this data into 01:02:15 but not in time format but a duration. Is there a way to do that.
This comment was minimized by the moderator on the site
=A1/(24*60) (algebra methods)..hahhaha
then apply time format
This comment was minimized by the moderator on the site
How can I convert 1 Hour 35 Min 25 Sec, stored as a text format into Hour format (hh:nn:ss)?
This comment was minimized by the moderator on the site
Hi, Gabriel, you can try this formula =TIME(LEFT(K4,1),MID(K4,8,2),MID(K4,15,2)) K4 is the cell contains text you want to convert, then format the result as time.
This comment was minimized by the moderator on the site
2h 50m how do i convert into 2:50
This comment was minimized by the moderator on the site
Hi, Ayaan, you can try Find and Replace function, h (blank) replace wth : , m replace with nothing
This comment was minimized by the moderator on the site
using the [ =TEXT(--(LEFT(A1,LEN(A1)-1)),"0\:00\:00")+((RIGHT(A1,1)="P")/2) ] formula,
in example #2 above, 123706A >> gets converted to 12:37:06 PM (instead of 12:37:06 AM)
how may this be rectified?
This comment was minimized by the moderator on the site
You only need to change the P to A in the formula =TEXT(--(LEFT(A1,LEN(A1)-1)),"0\:00\:00")+((RIGHT(A1,1)="A")/2), the format the formula cell as hh:mm:ss AM/PM
This comment was minimized by the moderator on the site
so if you enter 35943A you get 3:59:43 AM (which is great).
but if you enter 123706A you would expect to get 12:37:06 AM but instead you get 12:37:06 PM (which is not so great).
also if you enter 123706P you get 12:37:06 AM (again expecting to get 12:37:06 PM).
the meridiem are only incorrect for 12xxxx, formula works flawlessly for 1~11.
any way to improve the formula, to be all encompassing? thank you
This comment was minimized by the moderator on the site
It is a little complex, sorry I cannot help you. Maybe someone in our forum https://www.extendoffice.com/forum.html can help you if you place the question in it.
This comment was minimized by the moderator on the site
using the [ =TEXT(--(LEFT(A1,LEN(A1)-1)),"0\:00\:00")+((RIGHT(A1,1)="P")/2) ] formula,
in example #2 above, 123706A >> gets converted to 12:37:06 PM (instead of 12:37:06 AM)
how may this be rectified?
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