Forum Discussion
dowlers44
Jan 28, 2022Copper Contributor
Changing hours to days on existing file
Hi, apologies if this has been asked before but is there a quick means to change the durations in the durations column within an existing file between hours, days and weeks?
I am aware of the Scheduling tab within the Project options box, but changing the durations unit here only takes effect when adding new tasks or manually amending the durations one by one. However, my programme is over 1000 lines so changing each duration manually is not something I want to do.
Is there a quicker means or straightforward workaround to this problem?
Many thanks
I am aware of the Scheduling tab within the Project options box, but changing the durations unit here only takes effect when adding new tasks or manually amending the durations one by one. However, my programme is over 1000 lines so changing each duration manually is not something I want to do.
Is there a quicker means or straightforward workaround to this problem?
Many thanks
Older versions of Project (i.e. pre-Project 2010) contained a neat little utility macro that did exactly what you want but unfortunately that utility was dropped. However, I believe you can still get a free version of that macro from Rod Gill's website at:
https://www.project-systems.co.nz/project-vba-macros/FormatDuration.html
Hope this helps.
John
3 Replies
- John-projectSilver Contributor
Older versions of Project (i.e. pre-Project 2010) contained a neat little utility macro that did exactly what you want but unfortunately that utility was dropped. However, I believe you can still get a free version of that macro from Rod Gill's website at:
https://www.project-systems.co.nz/project-vba-macros/FormatDuration.html
Hope this helps.
John
- dowlers44Copper ContributorI am not normally in favour of running third-party content, particularly as I thought that surely, SURELY such a functionality would exist on MS Project. It makes no sense that using the Project Options and Schedule tab function to change duration units only works from when you start to add new tasks - I mean what happens if a planner from the supply chain issues a programme in hours or an exported file from another programme software imports in hours - how does this software perform if you cannot make a simple conversions to days, weeks or another unit of time!! Aaagh!
Anyway, in short, I followed and downloaded the macro as you suggested and it performs very well so a big thank you.
For anyone else reading this, there is also a work around (though I hate workarounds!) that other members of our planning team posted and which I have seen posted online.
STEP 1 - Click File, then Options, then Schedule. As other advice suggests, under 'Duration is entered in', select the duration unit you wish to convert to. Return to your programme by clicking OK.
STEP 2 - Right click against the current duration column and click Add a new column. Rather than select anything from the drop down list, just name the column 'Duration1' and it should standardise as a duration column with the unit you wish to convert to.
STEP 3 - Right click on the heading of 'Duration1' select 'Custom Fields'. Click on formula in the middle of the box and type [Duration]. Include the square brackets.
STEP 4 - Click Ok and OK on all remaining boxes to return to your programme. Duration1 should now match with the Durations column, but in the unit of your choice.
STEP 5 - Under 'Gantt Chart Format', uncheck the box for summary tasks in order to ensure they are now showing in your programme.
STEP 6 - Highlight 'Duration1' column and copy and paste this across to the Duration column.
STEP 7 - Delete Duration1 column and reinstate the summary bars by re-checking the box,
Voila.- John-projectSilver Contributordowlers44,
Although I've never run across an absolute need to convert the Duration field of existing tasks, and I've been using various versions of Project since Project 4 (Project 1997), I am also surprised the developers decided to remove the macro utility for Format Duration. I think Rod felt the same way and hence developed his own version of the macro.
The process used by your colleagues is of course also viable but having the capability in automated form (i.e. macro) is much more convenient and reliable (i.e. not prone to human error).
If I answered your question, please consider marking my response as the answer.
John