Need a Formula

Joe Galvan

Board Regular
Joined
Jun 24, 2008
Messages
152
Hi All!

I am pulling information as a download into Excel 2010... Unfortunately the time portion of my download doesn't come through formatted. . . I was hoping someone can help me out with a formula that can pull pieces of the time, so I can get them separated and then concatenate.


time is formatted as military time, which I am fine with...


Below are a few examples of how the time is coming through

<TABLE style="WIDTH: 43pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=57><COLGROUP><COL style="WIDTH: 43pt; mso-width-source: userset; mso-width-alt: 2084" width=57><TBODY><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #d4d0c8; BORDER-LEFT: #d4d0c8; BACKGROUND-COLOR: transparent; WIDTH: 43pt; HEIGHT: 15pt; BORDER-TOP: #d4d0c8; BORDER-RIGHT: #d4d0c8" height=20 width=57 align=right>172942</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #d4d0c8; BORDER-LEFT: #d4d0c8; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: #d4d0c8; BORDER-RIGHT: #d4d0c8" height=20 align=right>100656</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #d4d0c8; BORDER-LEFT: #d4d0c8; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: #d4d0c8; BORDER-RIGHT: #d4d0c8" height=20 align=right>100747</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #d4d0c8; BORDER-LEFT: #d4d0c8; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: #d4d0c8; BORDER-RIGHT: #d4d0c8" height=20 align=right>3043</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #d4d0c8; BORDER-LEFT: #d4d0c8; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: #d4d0c8; BORDER-RIGHT: #d4d0c8" height=20 align=right>42414</TD></TR></TBODY></TABLE>


I need to be able to break it down... for instance lets take the first & fourth times represented above, they should come out looking like below

17:29:42 (HH:MM:SS)
00:30:43 (HH:MM:SS)


I have thousands of rows... so if I dont have to add anything, that would be GREAT!


thanks in advance!!


JOE
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Hello

So you really have the NUMBER 172 thousand 9 hundred forty two for the first one? That is key to know. You don't have text cells?
 
Upvote 0
The cells are not text... they come in formatted as General.


172942 is really military time, not a number

I am trying to get formatted as 17:29:42



thanks...
 
Upvote 0
If you right click the cells and choose Format cells..., what are the numbers you see with "General" under the tab "Number"? Is it what I wrote above?
 
Upvote 0
General: 172942

Numbers: Just 4 different ways to format a number...



Do you understand what I have and what I want as an end result?


have: 172942

Need it to be: 17:29:42
 
Upvote 0
I understand the purpose, but irrespective of the formatting, I want to be sure about the NUMBERS themselves. So the cell contents, not the way Excel shows them.

But I will create the formulas based on my postings above.
 
Upvote 0
Probably it can be shortened, but me this works:

=TIMEVALUE(MID(RIGHT("00000"&A1,6),1,2)&":"&MID(RIGHT("00000"&A1,6),3,2)&":"&MID(RIGHT("00000"&A1,6),5,2))
 
Upvote 0
Or try this:

<b>Excel 2007</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6"><colgroup><col width="25px" style="background-color: #E0E0F0" /><col /><col /></colgroup><thead><tr style=" background-color: #E0E0F0;text-align: center;color: #161120"><th></th><th>A</th><th>B</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">1</td><td style="text-align: center;;">Data</td><td style="text-align: center;;">Time</td></tr><tr ><td style="color: #161120;text-align: center;">2</td><td style="text-align: center;;">172942</td><td style="text-align: center;;">17:29:42</td></tr><tr ><td style="color: #161120;text-align: center;">3</td><td style="text-align: center;;">100656</td><td style="text-align: center;;">10:06:56</td></tr><tr ><td style="color: #161120;text-align: center;">4</td><td style="text-align: center;;">100747</td><td style="text-align: center;;">10:07:47</td></tr><tr ><td style="color: #161120;text-align: center;">5</td><td style="text-align: center;;">3043</td><td style="text-align: center;;">00:30:43</td></tr><tr ><td style="color: #161120;text-align: center;">6</td><td style="text-align: center;;">42414</td><td style="text-align: center;;">04:24:14</td></tr></tbody></table><p style="width:3.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #A6AAB6;border-top:none;text-align: center;background-color: #E0E0F0;color: #161120">Sheet2</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #A6AAB6"><thead><tr style=" background-color: #E0E0F0;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B2</th><td style="text-align:left">=TIME(<font color="Blue">INT(<font color="Red">A2/10000</font>),INT(<font color="Red">(<font color="Green">A2/10000-INT(<font color="Purple">A2/10000</font>)</font>)*100</font>),A2-INT(<font color="Red">A2/100</font>)*100</font>)</td></tr></tbody></table></td></tr></table><br />
Markmzz
 
Upvote 0

Forum statistics

Threads
1,224,509
Messages
6,179,192
Members
452,893
Latest member
denay

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