#### Formatting 'Hours' in work field with out decimals

```I need help in formating the work hours showing rounded off to next hr,
rather than showing with one decimal. Appreciate help
```
 0
Utf
1/26/2010 8:05:01 PM
project 1276 articles. 0 followers.

3 Replies
4195 Views

Similar Articles

[PageSpeed] 10

```What about using the Round function?

Round([Field],0) - or something like that syntax.

- Andrew Lavinsky
Blog: http://blogs.catapultsystems.com/epm

> I need help in formating the work hours showing rounded off to next
> hr, rather than showing with one decimal. Appreciate help
>

```
 0
Andrew
1/26/2010 8:48:39 PM
```On Jan 26, 2:05=A0pm, drjayr2002 <drjayr2...@discussions.microsoft.com>
wrote:
> I need help in formating the work hours showing rounded off to next hr,
> rather than showing with one decimal. Appreciate help

There is no way to change then number of decimal places in the Work
field.  You could insert a custom text field and use the formula:
Round([Work]/60) & " hrs"
```
 0
Dave
1/26/2010 9:11:14 PM
```On Jan 27, 1:05=A0am, drjayr2002 <drjayr2...@discussions.microsoft.com>
wrote:
> I need help in formating the work hours showing rounded off to next hr,
> rather than showing with one decimal. Appreciate help

Yes, you can do it using macros. Note, you don't need to be an expert
to understand the below code.

*Steps*
1. Choose Tools | Macros | Macro (or) Alt + F8; Macros dialog box
should be displayed
2. Enter the name of the macro, say "RoundWork"; you will observe
"Create" button is enabled
3. Paste the below code inside the function
Sub RoundWork()
For Each t In ts
If Not t Is Nothing Then
If Not t.Summary Then
t.work =3D AsymUp(t.work/ 60) * 60
End If
End If
Next t
End Sub

Function AsymUp(ByVal X As Double, _
Optional ByVal Factor As Double =3D 1) As Double
Dim Temp As Double
Temp =3D Int(X * Factor)
AsymUp =3D (Temp + IIf(X =3D Temp, 0, 1)) / Factor
End Function
4. Save the macro.

*How it works?*
1. The above code gets the list of tasks in the *active* project and
if it is not a summary task, it rounds its current work. The number 60
in the formula AsymUp(t.Duration / 60) * 60 indicates the number of
minutes per hour.
2. When the above macro is run, the duration and assignment units may
3. I have written a custom function AsymUp(), and not used Round() or
Fix(). Round() rounds to the next hour only if the its decimal value
is greater than 0.5 and also Fix() will be truncate the decimal
values.
3. Warning! The above code will overwrite the existing values in  work
column.

To run the macro visit Tools | Macros | Macro and run the macro.

Please let us know if this helps.

- Sai, PMP, PMI-SP, MCT, MCTS
http://saipower.wordpress.com
```
 0
Sai
1/27/2010 8:53:50 AM

Similar Artilces:

negative number format
I have a report uploaded to excel from a particular program used here at work. In that program, negative numbers have the format of \$###.00-, with the minus sign at the end instead of the beginning. When the data comes over to Excel the minus sign is still at the end of the number. The text currently has a General Format with No Specific Number Format. I have been manually moving the minus signs to the beginning in each cell, then changing the Column to Currency Number Format which is very time consuming. Is there a formula I can use in the Cell, Column and/or Worksheet containing...

Change date format to European format
My computer is set to European date format but Excel is default to American date format. Can someone advise how to change this default setting. Thanks, Scott Have you restarted Excel since setting the system date formatting? Excel takes its cue from the OS on launch. Also, double-check the Regional setting in the System Prefs. If those aren't the cause you'll need to be specific about your version & update levels of both Office & OS X plus any other details you can supply. -- HTH |:>) Bob Jones [MVP] Office:Mac "Scott" <NoSpam-Scot...

"Create a Company" task not working on Win XP
We just upgraded to GP 9 and put the "client/server" client on a Windows XP Pro box. So that is where I need to run Utilities to add a new company. Utils works fine up until where you specify the location to put the Sql data and log files. The browse buttons are greyed out, so I can't browse to the sql server. I tried putting in UNC paths and mapped drive paths, but it wouldn't take either. How can I create a new company? Am I stuck? Did I need to put this "client/server" client on a Win2k3 box? or even on the very same box as the sql server? Yikes! ...

Webcam Not Working For Video Call
My webcam isnt working for Video Calls but aparently it works when i just show my camera then call the other person normally but the quality is below average. I set up the cam in the Options, sign-off and back on, yet it still doesnt work. I've been getting so many problems with MSN and its very frustrating. Greetings, What type of camera is this? -- Jonathan Kay Microsoft MVP - Windows Live Messenger MSN Messenger/Windows Messenger MessengerGeek Blog: http://www.messengergeek.com Messenger Resources: http://messenger.jonathankay.com (c) 2010 Jonathan Kay - If redist...

Required field added to existing records
Hello, I have a existing table with data already created. I need to add a field to this table that is going to be required from now on. When I open the form to update the record it allows me to add the information to the required field. But when I tested the record to see if it would flag me on the required field by closing it, it closes without flaging me to enter the information in the required field. Can I update existing records on a form for a newly added required field and have it flag me if the data is not enter on a form. Thanks, Robin You need to add the field to the table...

Outlook Mobile Service Address Book NOT Working
Every time I try to send a text message through Outlook Mobile Services, I CANNOT use the address book. It has been "made" when I configured the account, but it does not contain ANY mobile numbers from my main Outlook address book, as it is supposed to. I must physically type in the full mobile phone number. It does not appear in the mobile address book, even after I send a text message through Outlook. Outlook also quits - kicks me right out and restarts - each time I try to use the mobile address book. Can someone please help me figure out what is wrong? Please excu...

Formatting just some rows
Thank you so much for that, it'll save loadsa time. I adjusted the formula as the original sheet contined 11 columns of data. Can you help with this part now? The original sheet had dates in Column E (in the form Jan-03). Thay have come through on the new sheet in the single column as 5 digit figures such as 37622. Is there any way of getting the original form of the date back, affecting just rows 5, 16, 27 etc...of the new sheet? Perhaps I need to format just these rows on the NEW sheet. A similar problem exists with column I of the original where the � sign has been lost. Again is t...

I have two questions about OL2003: 1. Word is set as default editor. In replying message, sometimes I will get extra lines on hitting Enter. It makes more space between paragraphs. Is there any way to insert one line with one Enter? 2. I'd like to have special effect in replying text message sometimes, such as change color of font, but it cannot be done unless changing the message format to be rich text or HTML. If I uncheck Word as default editor, there is an option in menu. What is it about with Word as editor? Thanks, Charles 1 - Check the paragraph spacing settings e...

freezing formatting
I would like to be able to "freeze" the formatting for the number of decimal places in cells - some will need to be integers, some will need three decimal places, etc. The problem comes when I paste in information; the number of decimal places I have formatted the cell for is overridden by the pasted-in data. Any ideas? On Fri, 24 Oct 2003 13:31:05 -0700, "H" <anonymous@discussions.microsoft.com> wrote: >I would like to be able to "freeze" the formatting for the number of decimal places in cells - some will need to be integers, some will need three de...

I Do Not Understand How Mail Progams Work
Hey everyone! I sincerely want to get a better understanding of some aspects of my computer. I can get around on it and do ok but I need to take it up a notch and get more familiar with the technology. I'll list an item or two here and then move forward from there. My computer is an HP Pavillion Slimline, S7700n, with AMD 64 Athlon X2. It came with Vista 32 Home Premium. I find that it works well for everything I use my computer for at this point. Questions: What is the best way to use email? I don't understand the difference between Outlook, Live Mail, Windows Mail etc....

How do I do a global field search?
I have WinXP and Access2003. I have just finished changing over a text primary key "ProductID" to a autonumber "ProdID". This was successful, and all the database (including the Combos and the xtab queries) work OK. But now I want to get rid of all the old Text "ProductID" values and fields. I have done this manually as far as possible, but is there a "Find" function to locate all the redundant "ProductID" all through the database? Please help Frank No there is such thing built in. You will have to do manual searches through al...

Negative number formatting
Hi everyone, does anyone know how to do this? I hve a column of figures some positive and some negative. I want to format them so taht th negative numbers are expressed in (brackets) and also so that th column itself is decimal aligned, so even if I don't use decimal place the brackets "stick out". I know Word does this in tables, but I can' seem to make Excel do it. Help! Thanks, Vicky. :confused -- VickyJone ----------------------------------------------------------------------- VickyJones's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2448 ...

how do i make a word docx with both hyperlinks and form fields
How do I make a word document with both clickable hyperlinks and form fields to be filled out? I couldn't seem to apply the required protections for form fields without making the hyperlinks inaccessible. I tried putting the separating the section of the doc with hyperlinks from that with form fields but couldn't get the protection required for form fields to apply to one section and one section only. thanks See http://word.mvps.org/FAQs/TblsFldsFms/HLinksInForms.htm -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps...

Autocomplete not working #2
My autocomplete isn't working and it seems the correct settings are setup. I go to Tools>options>Preferences tab>email options>advanced options. I select "Suggest names when completing to, cc and bcc fields" In my Outlook contacts, I have a contact name Luke Tomsha, with and email address, ltomsha@xxxx.com. It the past, I'd like to type in luke and have it autocomplete, but it doesn't. Any ideas? Sincerely, Luke Autocomplete does not and never has used your address book. It uses a cache of names derived from messages you have sent. You won't se...

Hello, When I try to add a cusom field to the Accounts form I get several JavaScript errors on http:/crm/Tools/FormEditor/Dialogs/addfields.aspx (line 144 : Parameter incorrect) when opening the Web Page Dialog (Field list). When trying to add a field, I get an error 'crmDialog.TabName.returnValue' is null or not an object (line 94 in same aspx) If I continue, I get error 'Object doesn't support this property or method' at line 297. I noticed that this behaviour is only when I contact CRM from one PC. Is there any known compatibility issue as far as the Java VM is concern...

Format Smartlist field
Is it possible to format a smartlist field? Let's say from 2 decimals to 4 decimals? -- SmokyDuck This is only possible in SmartList Builder SmartLists, not in the 'out of the box' SmartLists. In SmartList Builder, you can click on the Display Name of a field, then click the blue arrow in the header to go to Set Field Options. For number fields there will be a tab called Decimal Places. -- Victoria Yudin Dynamics GP MVP Flexible Solutions, Inc. "Smokyduck" <Smokyduck@discussions.microsoft.com> wrote in message news:98223149-4092-484D-886D-F03A319319E...

Enforce format
How can I "enforce" a format in a cell in excel so that it allows number entry only, i.e. it does not allow letters or any other characters. Thanks in advance. Keith Data Validation; custom formula; If active cell is A1, use this: =NOT(ISERROR(1*A1)) "Elfey1001" <Elfey1001@discussions.microsoft.com> wrote in message news:D744EEFC-3BD0-43A7-B673-F16107BBFA03@microsoft.com... > How can I "enforce" a format in a cell in excel so that it allows number > entry only, i.e. it does not allow letters or any other characters. > Thanks in advance. > Kei...

Conditional Formating Help
Hi I wonder if anyone could help me, I am after code for the following. cell e6 = Keys Sent Column f6 = Keys due Column g6 = Keys received What I want the script to do is if there is no value in g6 and todays date is greater then the date stated in F6, then the cell turns red (prompt to inform me that keys are late). Many thanks Dan Use a CF formula of =AND(G6="",TODAY()>F6) HTH Bob "housinglad" <housinglad@discussions.microsoft.com> wrote in message news:A5887369-33DA-489A-BEC9-8173707313C6@microsoft.com... > Hi > ...

CTRL+Shift+Arrow Doesn't Work
Since yesterday I've not been able to use the ctrl+shift shortcut to select data ranges. I press the keys and nothing happens. I can still use other ctrl shortcuts, this is the only one that isn't functional. Does anyone know what could be the cause? Thanks, Elon I just wanted to add that this is for excel 2003 sp1. "Elon" wrote: > Since yesterday I've not been able to use the ctrl+shift shortcut to select > data ranges. I press the keys and nothing happens. I can still use other > ctrl shortcuts, this is the only one that isn't functional. Do...

Outlook 2003 unresponsive when viewing messages in HTML format.
About two weeks ago, I started Outlook and went in to view messages. On some messages, Outlook would appear to lock up and my harddrive light would come on continuously for a minute or more. The body of the message would appear as an empty window. We have discovered that the problem only occurs for email messages that are in HTML format. I can prevent the problem by going to: Tools > Options > Email Options and checking "Read all standard mail in plain text". When I have this option turned on, I can see a plain text version of the message. Unfortunately, much of ...

Select Case Conditional Formatting Sub?
I've tried to use the Sub below (Posted by Julie D I think) as a work around for more than three conditional formats and it works great IF I enter the data directly in the target cells. But, if the taget range is populated by a formula the color changes do not occur. Is there a way to modify this to work when the cells in the target range are formula driven? (Or, maybe I'm doing something wrong, any ideas?) Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Range("B6:B10")) Is Nothing...

User Defined Query Function Not Working with Multiple Criteria
Using Access 2007 I created a user defined function used in a query that works fine on single criteria but not two or more. These work fine: MyFunction="Open" MyFunction="Closed These don't work: MyFunction="Open Or Closed" MyFunction="'Open' Or 'Closed'" What do I need to type to get this to work? Unless you let us know something specific about the function itself, it's going to be difficult to diagnose why it isn't working. Consider posting the function ... (and wouldn't the function spell out how many...

Add opt. to change Printer-Friendly format to user defined format
This is a customer suggestion from Convergence. Customer would like to be able to have the option to change the Printer-Friendly format to a different/user defined format. 1. Employee enters a requisition. 2. Purchasing manager processes the Requisition: BP>Purchasing>Requisitions 3. Select a vendor and requisition. 3. User selects to view the requisition; Printer-Friendly Version opens. ISSUE: Currently, there are no options to define report format. For further inquiry- Customer Information: Jon Heseman, PC Administrator EFCO Systems 1800 N.E. Broadway Des Moines, Iowa...

Searching through DB Table containing Records in XML format
Guru's! Your time and guidance is much appreciated in this task that i am trying to get done. Background I have a SQL Server 2000 database table which contains 2 Fields (RecordID, XMLData (datatype=TEXT). There are about 10,000 records in this table. The Data in the field (XMLData) is a XML formatted string. (where F1,F2... are elements and v1, v2 is the data) <ControlRecord><F1>V1</F1><F2>V2</F2><F3>V3</F3><F4>V4</F4><F5>v5</F5><f6>v6 </f6>.....Upto 14 fields </ControlRecord> <ControlRecord><...

Excluding Alpha character in text field by filtering.
I have a query based on a table./ I have one numeric field that has alphanumber entries: A2000-000; 101010010,A2004, etc.. I what the filter to exclude all records that have an apph beginning - ie. in eg. above exclude: A2000-000,A2004. How do I do this? Your assistance is greatly appreciated. You could use WHERE Left\$(AlphanumericField, 1) NOT BETWEEN "A" AND "Z" or WHERE Val(AlphanumeriField) <> 0 -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Grace" <fhsmith7@bellsouth.net> wrote in message news...