Help me convert a column of times from text, but starting like this (thank you)

thankyou

Board Regular
Joined
Aug 13, 2008
Messages
189
754
1007
1102
806

<colgroup><col style="width:48pt" width="64"> </colgroup><tbody>
</tbody>


I've hand tallied a bunch of data (as text format), but to save time, I didn't enter the ":" (notice I didn't say "enter the colon"...wait I just did:eek:). Joking aside, I was wondering if you could help me convert that style to time format, exactly as above, but with these criteria:

time format
adding back the colon
no seconds
no am/pm

Change times to 24h

I hope this question isn't too boring, and thanks again for your help.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
I'm not sure I understand exactly but maybe something like ?

formatted as [h]:mm

Excel 2012
AB
27547:54
3100710:07
4110211:02
58068:06

<tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
B2=0+TEXT(A2,"00\:00")

<tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
Thoroughly helpful! huge thanks...now if I could just get that column to 24h format, so I can get my "1"s to "13"s. Appreciate you.
 
Upvote 0
Assuming your "time" values are in Column A starting at Row 1, does this macro produce the result you want (note... it physically changes your data cells in place)...
Code:
Sub FixTimeValues()
  With Range("A1", Cells(Rows.Count, "A").End(xlUp))
    .Value = Evaluate(Replace("IF(LEN(@),0+REPLACE(@,LEN(@)-1,0,"":""),"""")", "@", .Address))
    .NumberFormat = "h:mm"
  End With
End Sub
 
Upvote 0
i'm a little confused on the whole 24h question....

are all the times supposed to be 12 hours later than they are displayed?

if that's true then you can try something like =0.5+TEXT(A2,"00\:00")
 
Upvote 0
Weazel,

I was just writing in the following and hit return, but I had my tab on "protect", which I think get my browser from submitting, since requires redirect...then your post came thru. Bottom line: no worries on the 24h item. I wrote:

Kindly disregard my part re 24h. I was able to go through my small sample data and just convert the few manually. Thanks for all your help! It made a big difference.

Still getting my hang on things around here. Patience from awesome contributors like yourself and Rick make all the difference and make this site awesome. Rick, thank you so much. I will try that now, for a learning point and follow up shortly.
 
Upvote 0
ok, rick, I think macros aren't for me. they used to be, but I've just lost the patience. I think I spent about 30-45mins on this, so I had to give up. I've run out of time. I remember I used to run them reluctantly, but I think you just have to be versatile in them with shortcuts etc. I just don't have the patience. I remember in the past, when I did run them occasionally, I had the same bad feeling, where just getting to copying and pasting the **** thing lol was a royal pain. I think my brain just likes the other excel stuff. Thanks though. Doesn't mean it won't help others. Well, I have to get back to work, thanks again Weazel.
 
Upvote 0

Forum statistics

Threads
1,214,864
Messages
6,121,986
Members
449,060
Latest member
mtsheetz

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