time format from a CSV file

TJHardcore14

New Member
Joined
Nov 16, 2018
Messages
3
Hi,

just registered however have had massive amount of help from answered questions in the past.

ok I have a table s below

Column A1-A3
81616
111056
32251

I need column B1-B3 to end up with this format 00:00:00

I have tried formatting the cells with no joy, i have tried several ways

Please can you help
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
use this function after import to convert:
usage: =Cvt2Time(A1)


Code:
Function Cvt2Time(ByVal pvNum)
  If Len(pvNum) = 5 Then pvNum = "0" & pvNum
  Cvt2Time = Left(pvNum, 2) & ":" & Mid(pvNum, 3, 2) & ":" & Right(pvNum, 2)
End Function
 
Last edited:
Upvote 0
Column A1-A3
81616
111056
32251
I need column B1-B3 to end up with this format 00:00:00

If you expect the following results:
8:16:16
11:10:56
3:22:51

enter the following formula into B1 and copy down:
=--TEXT(A1,"00\:00\:00")

formatted as Custom [h]:mm:ss .

I recommend that instead of h:mm:ss on the off-chance that your input represents more than 23:59:59.
 
Upvote 0

Forum statistics

Threads
1,215,025
Messages
6,122,731
Members
449,093
Latest member
Mnur

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top