Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
darkbearpooh1
 
Posts: n/a
Default Military time trouble


needa macro or something to change the time format of hh:mm to 1-12then
1-12 again instead of 13:00 so it would go from 12:30 to 1:00 instead
of 13:00
any ideas? tia


--
darkbearpooh1
------------------------------------------------------------------------
darkbearpooh1's Profile: http://www.excelforum.com/member.php...o&userid=30640
View this thread: http://www.excelforum.com/showthread...hreadid=514066

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default Military time trouble


Is this just a formatting issue?

If you show 13:00 as 01:00 how can you tell 01:00 from 13:00? Or do you
want to show AM and PM, if so just format cell to show hh:mm AM/PM


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=514066

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
darkbearpooh1
 
Posts: n/a
Default Military time trouble


trouble is it makes my columns too wide to put the am or pm i even tried
editing
other areas to scrap space but this is a file that has to be printed
and can't be cut off. i don't want to differentiate between am /pm well
it can but its just too big lol. i need that format without the am pm
showing up if possible and the military format is not what i really
want


--
darkbearpooh1
------------------------------------------------------------------------
darkbearpooh1's Profile: http://www.excelforum.com/member.php...o&userid=30640
View this thread: http://www.excelforum.com/showthread...hreadid=514066

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Military time trouble

Function GetTime(rng As Range, ci As Long, Start As Boolean)
Dim cell As Range
Dim i As Long
Dim j As Long
If Start Then
For i = 1 To rng.Columns.Count
If rng.Columns(i).Interior.ColorIndex = ci Then
j = IIf(i 25, i - 24, i)
GetTime = TimeSerial(Int(j / 2), (j Mod 2) * 30, 0)
Exit For
End If
Next i
Else
For i = rng.Columns.Count To 1 Step -1
If rng.Columns(i).Interior.ColorIndex = ci Then
j = IIf(i 25, i - 24, i)
GetTime = TimeSerial(Int(j / 2), (j Mod 2) * 30, 0)
Exit For
End If
Next i
End If
End Function



--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"darkbearpooh1"
wrote in message
news:darkbearpooh1.23gbtz_1140310801.5758@excelfor um-nospam.com...

trouble is it makes my columns too wide to put the am or pm i even tried
editing
other areas to scrap space but this is a file that has to be printed
and can't be cut off. i don't want to differentiate between am /pm well
it can but its just too big lol. i need that format without the am pm
showing up if possible and the military format is not what i really
want


--
darkbearpooh1
------------------------------------------------------------------------
darkbearpooh1's Profile:

http://www.excelforum.com/member.php...o&userid=30640
View this thread: http://www.excelforum.com/showthread...hreadid=514066



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
darkbearpooh1
 
Posts: n/a
Default Military time trouble


works like a charm!!! Thanks a million!


--
darkbearpooh1
------------------------------------------------------------------------
darkbearpooh1's Profile: http://www.excelforum.com/member.php...o&userid=30640
View this thread: http://www.excelforum.com/showthread...hreadid=514066



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
darkbearpooh1
 
Posts: n/a
Default Military time trouble


umm sorry works perfect but i just noticed the finish time is exactly 30
minutes behind the proper time it should be can you help..


--
darkbearpooh1
------------------------------------------------------------------------
darkbearpooh1's Profile: http://www.excelforum.com/member.php...o&userid=30640
View this thread: http://www.excelforum.com/showthread...hreadid=514066

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
darkbearpooh1
 
Posts: n/a
Default Military time trouble


figured it out, i am so stupid lol, ok i fixed it by adding a extra
column and starting the out time one cell later =) thank you !!!


--
darkbearpooh1
------------------------------------------------------------------------
darkbearpooh1's Profile: http://www.excelforum.com/member.php...o&userid=30640
View this thread: http://www.excelforum.com/showthread...hreadid=514066

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Military time trouble

All done when I was in the land of z's <vbg

Bob

"darkbearpooh1"
wrote in message
news:darkbearpooh1.23gp9a_1140328201.4517@excelfor um-nospam.com...

figured it out, i am so stupid lol, ok i fixed it by adding a extra
column and starting the out time one cell later =) thank you !!!


--
darkbearpooh1
------------------------------------------------------------------------
darkbearpooh1's Profile:

http://www.excelforum.com/member.php...o&userid=30640
View this thread: http://www.excelforum.com/showthread...hreadid=514066



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using military time but with 100 minutes not 60 minutes srwamp Excel Discussion (Misc queries) 7 November 21st 05 09:41 AM
conditional formatting with time values Access Idiot Excel Discussion (Misc queries) 2 September 13th 05 03:29 PM
Time Sheets Lady Layla Excel Discussion (Misc queries) 1 March 23rd 05 03:22 PM
in excel totaling weekly hours military time mel Excel Worksheet Functions 1 January 17th 05 04:24 PM
how do you subtract military time? example 12:00 - 07:00 = 5 hour. Bill Excel Worksheet Functions 1 October 27th 04 08:25 PM


All times are GMT +1. The time now is 06:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"