Week Numbers in Bar Styles required
Forum Sponsor
Top Posters
Julian Pegg
1 posts
Peter Nagy
2 posts
Raymund de Laza
17 posts
Syed_Asad
0 posts
Tony Greyvenstein
0 posts
Ahmed Al-Jubouri
13 posts
Umar Alvi
3 posts
Sibusiso Mahlalela
0 posts
Michael Samanyayi
3 posts
Simon Gumede
0 posts
Using a hardcoded constant such as "60*8*5" is not a good idea. The number of hours in a day or the number of hours in a week is controlled by Tools > Options > Calendar tab.
You should replace the hardcoded constants with either of [Minutes Per Week] or [Minutes Per Day] depending on your circumstances.
Lalit,
thanks for that, I have validated it & it works fine so will be keeping it handy for future reference.
Keep up the fine work, everybody!
Philip,
There can be another simple formula:-
"Wk " & Int(ProjDateDiff([Project Start],[Start],"Standard")/60/8/5)
HTH
Here is the sample file
http://rapidshare.com/files/244313154/Calendar_Weeks.mpp
Hi Darren
thanks for sharing the formula
but when i insert there is 1 week difference
week 50 is showing as 51
when i put a -1 in the formula everything works fine
except week 52 , which becomes CW-0 ??
why ?
any tweaks ?
regards
hemant
Phillip,
If I could claim it as my own I would, but the person you’ll have to buy the beer for is a guy called Jack Dahlgren. He posted it somewhere a few years ago, I can’t remember where, but any formulae I see that may be of use at a later date I tend to squirrel away until it’s needed.
I’ll keep any plaudits for passing it on though ;o)
Regards,
Darren
Darren,
If I could, I would drag you to the pub to buy you a few beers for that!
Many thanks for that as it worked!
Hi Phillip,
Are the Week numbers your client wants displayed the MS Project fiscal year (starts in Jan ends Dec) or from contract award/project start?
For the fiscal year you could customise a spare text field and use this formula
"W" & Format(DateAdd("d",7-Weekday([Finish]),[Finish]),"ww")
Regards,
Darren
Trevor,
Had a look at that, Im not sure about that format as I dont understand where first digit is coming from? For example it shows 1/Wk45...? What is with the 1/????
Any ideas?
Trevor,
Thanks for taking the time to explain it twice! LOL!
Yeah, its the weeks of the year I want to put in.
Had a hunch that this was something to calculate but dont have the inclination to go about it as quite busy at work these days!
I will give your idea a go later so thanks again!
This sounds like something that is completely unnecessary but was just whimsically dreamed up by your client without any regard for whether it is useful or even possible. But, ultimately, anything is possible if someone is paying for it.
Do you mean the week number since the project start date or the week number of the year?
See Format, Layout for the format of the dates that appear on the bars. There are week number formats at the bottom of the list, but they are the week numer of the year. If its in the drop-down list you can have it and if not then you cant.
Except that if you use a spare Start field and a spare text field you can do the necessary calculation with the available fields and functions, and format it any way you like, and use that field as the left hand bar text in the Bar Styles definition.
Having said how I would go about it, I havent actually done it, but leave it to you or someone who has the spare time to have go. Hope this helps.