#### Displaying Time In Decimal Formats

```I created a spreadsheet for making schedules, and am attempting to forc
time to display in hours (as in 7.5 hours), instead of normal tim
(7:30). I can't find a decent way of displaying it properly. Here's ho
I have it set up currently:

B5: Start_Time
C5: End_Time
B6: =IF(C5-B5>0.166666666666667;C5-B5-0.0208333333333333;C5-B5)

The formula in B6 just checks to see if the scheduled shift is MOR
than 4 hours long, and if so, subtracts half an hour from the shif
(for a lunch break), and then displays the result. I would like th
result to appear in hour format, as in 7.5, instead of time format
like it is currently. I have attempted every variation of the numbe
formatting I could think of, as well as searched numerous forum
appreciated

--
Jeremy.Whitne
-----------------------------------------------------------------------
Jeremy.Whitney's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3547

```
 0
6/16/2006 2:50:51 AM
excel 39879 articles. 2 followers.

4 Replies
445 Views

Similar Articles

[PageSpeed] 16

```On Thu, 15 Jun 2006 21:50:51 -0500, Jeremy.Whitney
<Jeremy.Whitney.29h55n_1150426501.5696@excelforum-nospam.com> wrote:

>
>I created a spreadsheet for making schedules, and am attempting to force
>time to display in hours (as in 7.5 hours), instead of normal time
>(7:30). I can't find a decent way of displaying it properly. Here's how
>I have it set up currently:
>
>B5: Start_Time
>C5: End_Time
>B6: =IF(C5-B5>0.166666666666667;C5-B5-0.0208333333333333;C5-B5)
>
>The formula in B6 just checks to see if the scheduled shift is MORE
>than 4 hours long, and if so, subtracts half an hour from the shift
>(for a lunch break), and then displays the result. I would like the
>result to appear in hour format, as in 7.5, instead of time format,
>like it is currently. I have attempted every variation of the number
>formatting I could think of, as well as searched numerous forums
>appreciated.

As far as I know, you cannot do that with formatting.

If you want to display time as decimal hours, you will need to convert the time
value to hours with a formula.

=time_value * 24

Then format the result as something like  0.00

--ron
```
 0
ronrosenfeld (3122)
6/16/2006 3:31:38 AM
```in b6, use your formula
=IF(C5-B5>0.166666666666667;C5-B5-0.0208333333333333;C5-B5)*24, then use
number format

"Jeremy.Whitney"
<Jeremy.Whitney.29h55n_1150426501.5696@excelforum-nospam.com> ���g��l��s�D:Jeremy.Whitney.29h55n_1150426501.5696@excelforum-nospam.com...
>
> I created a spreadsheet for making schedules, and am attempting to force
> time to display in hours (as in 7.5 hours), instead of normal time
> (7:30). I can't find a decent way of displaying it properly. Here's how
> I have it set up currently:
>
> B5: Start_Time
> C5: End_Time
> B6: =IF(C5-B5>0.166666666666667;C5-B5-0.0208333333333333;C5-B5)
>
> The formula in B6 just checks to see if the scheduled shift is MORE
> than 4 hours long, and if so, subtracts half an hour from the shift
> (for a lunch break), and then displays the result. I would like the
> result to appear in hour format, as in 7.5, instead of time format,
> like it is currently. I have attempted every variation of the number
> formatting I could think of, as well as searched numerous forums
> (including this one). Any help you could offer would be greatly
> appreciated.
>
>
> --
> Jeremy.Whitney
> ------------------------------------------------------------------------
> Jeremy.Whitney's Profile:
> http://www.excelforum.com/member.php?action=getinfo&userid=35479
>

```
 0
6/16/2006 3:35:10 AM
```That worked great, thank you very much. Can't believe it was so simple
and I didn't try it. :)

--
Jeremy.Whitney
------------------------------------------------------------------------
Jeremy.Whitney's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=35479

```
 0
6/16/2006 8:42:39 AM
```Format cell B6 as General and try this:

=IF((C5-B5)*24>4,(C5-B5)*24-0.5,(C5-B5)*24)

4 hours displays 4
5 hours displays 4.5  (5 - 0.5)

Hope this helped!

Dan
```
 0
MSO (2)
9/17/2006 5:45:12 AM

Similar Artilces:

How to handle blank date and time?
I use MFC Visual C++ 4.2 I am developing a database application using MS Access 2000. The problem I am dealing with is how to handle if the user does not enter the date. There is a condition where they can do that for Finish Process Date / Finish Process Time. I make the Date and Time as separate fields, both in the database and the application. On my application I use the COleDateTime data type. I have to save the blank Date and the blank Time, and I also have to acquire them back in order to display the data using the CListCtrl. What I am confusing is how to make the query? Is it...

Dual Displays
I want to connect my Sharp Aquos flat screen TV to my computer, and see my desktop on both the TV and computer monitor. Windows Vista Home Premium. HP Pavilion a1610n computer. Galaxy GeForce 8400 GS graphics card, outputs: 1-VGA, 1-DVI, and 1-SVGA. There is no HDMI port on the card. I connected a VGA cable between the motherboard "on-board" VGA port and the TV, figuring that I could use that output to work with the TV. The computer monitor is plugged into the GeForce graphics card. Tried the Desktop "Display Setting". It says, the number 2 monitor is "N...

Copying a format that has been conditionally formated
How do I cut and paste a formula picking up it's own values if the cell has been conditionally formatted. In example, c3 is to highligh in red/bold if it's value is lower than c29 (the value of the same info from year prior). It worked for that cell but I want to copy the formula for the rest of the 500+ cells so that d3 also read from d29, etc. HELP!! What, exactly, is the condition you set? I'm guessing it's something like 'formula is' =(\$C\$3<\$C\$29). If you use relative cell references, =(C3<C29), rather than the absolute references, then you should ...

how do I get imported addresses to autocomplete first time out
I have just upgraded from Outlook Express and cannot now get addresses in my addressbook imported from Express to autocomplete without laboriously entering each address in full the first time I use them. It's taking me forever. Is there somehow I can introduce Outlook to my entire addressbook on a batch basis, or is it really necessary to do it one name at a time? You don't understand. Autocompletion has nothing to do with your Contacts. It uses a cache of names that will be populated as you send messages. -- Russ Valentine [MVP-Outlook] "Frustrated user" <Frustr...

Time planner
Hi Anybody able to help? I need to quickly draw up a schedule for the set up of a large stage show (over 3 days 24hr working). I need to show time down one column in 15min stages in 24hr clock (Hrs & Mins). As usual time is of the essence. Many thanks Paul Type 00:00 in your first cell, 00:15 in the next, 00:30, 00:45 and 01:00. Then select the block of cells and position the cursor over the bottom right-hand corner. It'll change to a + cursor. Then drag down for your 24 hours (about 100 cells approx) "Paul" wrote: > Hi > > Anybody able to help? I...

Cond. Formatting w/ DLookup
A form has a command button to launch a popup form for records related to the first form. I'd like to be able to indicate on the first form, whether or not there are any records on the related (popup) form. Something conversationally like, "if there is a related record in the table associated with the popup form, make this field's background color blue". If I try to inch this along toward actual code, I get to, frmIv_OnCurrent If IsNotNull([tblFishCount]![IvId] where [IvId]=Me![txtIvId]) ....but I doubt that is very close to working code. Is it even in the right dire...

How change Date format in header?
How can I get the date in my header to display: "September 9, 2004" instead of "9/9/2004" right now the custom header is: &[Date] -- Thanks, Steve (office 2000) You'll have to use a little VBA. Option Explicit Private Sub Workbook_BeforePrint(Cancel As Boolean) Worksheets("sheet1").PageSetup.LeftHeader = Format(Date, "mmmm d, yyyy") End Sub Rightclick on the excel logo to the left of File (on the worksheet menubar) and select view code. Paste that code into the code window. Adjust the worksheet na...

Gotta ask one more time ...
Hi Folks, Can anyone explain to me how I can create a budget based on my own numbers - without the program (2003) changing them based on my previous spending? Isn't the whole point of a budget to STAY within the budgeted limits? I just can't figure out why the budgeting feature arbitrarily changes my budgeted values. Even when I start over from scratch, with a new budget, it just repopulates it the way it wants to - ignoring the numbers I put in to the budget planner. I have ignored the autobudget altogether. I have clicked autobudget and unchecked all the values. I have begged and...

Display a message box "this entry is a duplicate"
How can I display a message box on a form if the shipment number is a duplicate? I need a message box to pop up when user attempts to tab out of the field. Thank you. Something like: Private Sub txtShipNum_BeforeUpdate(Cancel As Integer) If DCount("*", "MyTable", "ShipNum = '" & Me.txtShipNum & "'") > 0 Then Msgbox Me.txtShipNum & " already exists." Cancel = True End If End Sub This assumes that your text box is named txtShipNum, that the name of the field in table MyTable is ShipNum...

Folder could not be displayed
I am running Windows XP and Outlook Express 6 just fine then one day my husband does something to my computer and his email account won't work. My email is working just fine but in his he cannot open his inbox. It says folder could not be displayed, and when you send and receive it gives you this error message: "An unknown error has occured. Account: 'incoming.verizon.net'. Server:'incoming.verizon.net'.Protocol:POP3, port: 110, Secure(SSL): No, error number: 0x800C013B" If anyone could help me with this I would greatly appreciate it. Thank you T...

One more TIME
Hi all After downloading data it is presented with a decimal(period) between the hours and minutes i.e.7.20 is really 7 hours and 20 minutes. Some data appears in hundreds eg 985.35. I need to compare this data with other correctly formatted timed data ie 7:20 to establish variances. I realise that i could use Tools/Autocorrect replacing the decimal with a colon but this changes the 7.20 to 07:02 and there is the danger that I might forget to change it back later. Is there a solution? Can this be done automatically by macro etc as there is quite a lot of data. Thanks in advance. Angelo Hi ...

how to display values in 3 cells into one cell
Anyone can help me how do I display the 3 separate different values in 3 cells into just one single cell ? thanks so much in advance. Either there was a typo or there's an echo in here. That line should have been: = A1 & " " & B1 & " " & C1 "Bradley Dawson" <bradleydawson@earthlink.net> wrote in message news:l464b.2224\$Lk5.2093@newsread3.news.pas.earthlink.net... > In the target cell, type: > > = A1 & B1 & C1 > > where A1, B1, C1 are the cell addresses that you want to concatenate. > > If these have number...

How to select & display distinct values
Hello, I need help with a form please. My form has two controls, the first being a combo box. This box should select the company name from a lookup table. The lookup table has only two companies in it, however, they each are repeated several time. Company 1 has about 10 rows, company 2 has 3 rows. I used the query builder and came up with the statement: "SELECT DISTINCT Lktbl_Role_Master.CompanyName FROM Lktbl_Role_Master;" When I run the statement directly from query view, it executes perfectly and returns exactly two rows (one for each company, in a datasheet view) ho...

Conditional Formatting
I need to change the fill color based on the values of other cells. Ex. if A1 is not a null value and the cell I want to format A2 is a null then I need A2 to have a red fill color and a certain text. If A2 isn't a null then it should turn green. If A1 and A2 have null values then A2 should be yellow. So just to sum up A1<>"" and A2 ="" then Make A2=Red Fill Color + text A1<>"" and A2 <>"" then A2=Green Fill Color A1="" and A2 ="" then A2=Yellow Fill Color Thanks for the help all. What version of Ex...

Display Time in Outlook
The time setting in my Outlook is one hour behind my actual time. I cannot determine how to change the time. Outlook is the only item that is incorrect. Other display times in operating system are correct. Thanks, Jodi ...

Money 2007 -- QIF import
Good Evening! After a little trial and error, I am able to import account transactions from another system (not a bank statement, my actual register transactions) with little trouble except for the date format. (Before someone gets mad at me, I really don't think this has anything to do with my regional settings!) As recommended by an MVP from this forum, I open my CSV file with excel, then use a converter (add-in) called XL2QIF to create a qif output file. The actual "data" in a date field in my original csv file is "060106" (mm/dd/yy) which is June 1, 2006,...

PK and FK Displayed
I am a complete Visio newbie, and cannot find the answer I need in books or online help. I am trying to create ER diagrams from scratch, and not connected to real tables, using VEA. I have added tables ('Entities') to the form, connected them with a Relationship connector, and, in the Database Properties window I've assigned the end points to a Primary Key on the left and a Foreign Key on the right. But the model shows the connector as running between the top colums on both sides, whereas I want the keys to be in that upper box and provide the connector's end points. Wh...

How to change default formatting
How can I prevent Excel guessing what it thinks I want to type in a cell (mainly text). If I type in 1/2 it thinks I want 1st February 2003, but I just want "1/2" If I type in MAR01 it thinks I want 1st March 2003 but I just want "MAR01" etc etc Its a real pain! I knew about that one thanks. However I want to avoid having to do that every time. Any other ideas? -- "Kevin Stecyk" <stecyk@nohotspammail.com> wrote in message news:OGhujJanDHA.2732@TK2MSFTNGP11.phx.gbl... > Ian, > > Try preceding the "text" with a single ' (apost...

Formulas are displayed, results are not
Hello, For some reason, when I enter a formula into a cell and press enter, the formula just stays there. Anyone know what I can do to show the results? I tried pressing Cntrl + `, but that didn't work. FYI, when I cut and paste a column from a separate workbook, that column works like normal (i.e., the formulas produce results). Thanks for any suggestions! Hi Mike, Maybe your cell is preformatted as Text. Try formatting to general then erase your = and type it in again. HTH Martin "Mike C" <js2k111@yahoo.com> wrote in message news:f699bcd4-ad82-4a88-9759-5638c147b...

Stop displaying a line
I have a line graph/chart and it gets its values using a formula and the values of another column. However this poses a problem because if there is nothing in the targetted column the formula returns 0 cause the line to drop to the bottom, instead of casuing the line to just end until a value is added to the target column. How can I do this? Change your formula to use NA() if the cell is empty. For example: =IF(A1="",NA(),A1) To hide the resulting #N/A errors on the worksheet, you can use conditional formatting. There are instructions here: http://www.contextures.com/xlC...

Typing times
Hi Is there a way to type times easily in Excel ? It is used for keeping track of times during production. Input would be; Startup 6.30 6.45 Production order No 1 6.45 8.30 Change of product 8.30 8.50 Production order No 2 8.50 12.15 Maintenance 12.15 13.00 Lunch 13.00 13.45 etc Data has to be summerized on the different lines (start up, production, maintenance, lunch etc) The problem is the time it takes to punch it in. Kind regards, Dean Dean, have a look here http://www.cpearson.com/excel/DateTimeEntry.htm -- ...

unattached textboxes disappear when a msgbox is displayed on a tab control
I'm using Access 2003. I have a form with a tab control on it. I was having problems with labels flashing and I followed the suggesting from Allen Browne - http://allenbrowne.com/ser-46.html. The flashing went away but now when a msgbox is displayed the unattached textboxes that I'm using as labels disappear. They come back as soon as the msgbox is removed from the screen. I've searched google looking for an answer but have come up short. Does anyone know why I'm experiencing this behavior and how to make it go away? Thanks, Rick That *is* strange. Have you tr...

A question about Console window(display or not display)
I've redirected the (stdin stdout stderr) of a console window process I spawned to a pipe. And I want to display the redirected console window, the question is: If I display it(set Create_new_CONSOLE in createprocess and some flags in startupinfo), I cannot use the redirected way of pipe, which means if i do not display, i can use the pipe communicating with the child process. Does it mean that as long as I disply the console window, windows will change stdin stdout to "screen&keyboard" instead of my pipe? That's right. If you redirect stdin or stdout then you preemp...

How do I change format of all comments in worksheet?
I want to be able to change font and size of text within comments in a whole worksheet, without having to do them individually. Anyone any ideas? see this site http://www.contextures.com/xlcomments03.html#Reset >-----Original Message----- >I want to be able to change font and size of text within comments in a whole >worksheet, without having to do them individually. Anyone any ideas? >. > ...

Extend Published free/busy time, consequences.
Hello there. I am thinking of extending the published Free/Busy time in Outlook to a year or two into the future. But how about the consequences in doing so, as seen from the Exchange perspective. Before Exch 2007 this information was stored in a public folder, now in Exch 2007 the check is made directly in the calendar using OWA, so I guess that there should be no problem in doing so? Anyone got any info or best practice I can lean up against. Best regards Jesper. Free-busy data is pretty small so I doubt think you'll have any trouble. But, seriously, who...