Website Upgrade Incoming - we're working on a new look (and speed!) standby while we deliver the project

Tips on using this forum..

(1) Explain your problem, don't simply post "This isn't working". What were you doing when you faced the problem? What have you tried to resolve - did you look for a solution using "Search" ? Has it happened just once or several times?

(2) It's also good to get feedback when a solution is found, return to the original post to explain how it was resolved so that more people can also use the results.

Week Numbers in Bar Styles required

11 replies [Last post]
Philip Kearney
User offline. Last seen 4 years 35 weeks ago. Offline
Joined: 26 Feb 2002
Posts: 19
Groups: None
Hi,

Having searched thru the records/archives for a similar thread, couldn’t find the answer I’m looking for!
So what I am looking for is probably complicated!...
Here goes for nothing...

On my gantt chart I want week numbers on the left side of the bars. I have my timeline on top showing the week numbers but having a bit of data on my programme, I would like to show the week number that each activity is at for quick reference for the client. I know how to show dates etc but not good enough...The client is interested in seeing his project activities referred by week numbers.
I have thought about lookaheads & mini schedules but bollocks to that as it’s un-neccessary work.
I have checked through the functions/options etc. but to no avail.
Someone out there knows that this can be done.
So thanks in advance!

Replies

L.E.N. Lewis
User offline. Last seen 3 years 1 day ago. Offline
Joined: 2 Aug 2007
Posts: 47
Groups: None
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.
Philip Kearney
User offline. Last seen 4 years 35 weeks ago. Offline
Joined: 26 Feb 2002
Posts: 19
Groups: None
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!
lalit sis
User offline. Last seen 15 years 27 weeks ago. Offline
Joined: 6 Oct 2008
Posts: 6
Groups: None
Philip,

There can be another simple formula:-

"Wk " & Int(ProjDateDiff([Project Start],[Start],"Standard")/60/8/5)

HTH
Hemanth Kumar
User offline. Last seen 1 year 42 weeks ago. Offline
Joined: 1 Nov 2002
Posts: 260
Groups: None
Hemanth Kumar
User offline. Last seen 1 year 42 weeks ago. Offline
Joined: 1 Nov 2002
Posts: 260
Groups: None
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
Darren Kosa
User offline. Last seen 8 years 9 weeks ago. Offline
Joined: 8 Feb 2008
Posts: 256
Groups: None
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
Philip Kearney
User offline. Last seen 4 years 35 weeks ago. Offline
Joined: 26 Feb 2002
Posts: 19
Groups: None
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!
Darren Kosa
User offline. Last seen 8 years 9 weeks ago. Offline
Joined: 8 Feb 2008
Posts: 256
Groups: None
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
Philip Kearney
User offline. Last seen 4 years 35 weeks ago. Offline
Joined: 26 Feb 2002
Posts: 19
Groups: None
Trevor,

Had a look at that, I’m not sure about that format as I don’t understand where first digit is coming from? For example it shows 1/Wk45...? What is with the 1/????
Any ideas?
Philip Kearney
User offline. Last seen 4 years 35 weeks ago. Offline
Joined: 26 Feb 2002
Posts: 19
Groups: None
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 don’t 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!
Trevor Rabey
User offline. Last seen 2 years 21 weeks ago. Offline
Joined: 29 Nov 2005
Posts: 530
Groups: None
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 it’s in the drop-down list you can have it and if not then you can’t.
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 haven’t actually done it, but leave it to you or someone who has the spare time to have go. Hope this helps.