Tuesday, February 21, 2012 1:43 PM
In Project 07 I have set up a group that sorts my work by week. When I pull this view it naturally takes the task IDs and has them out of order. Without losing my grouping is there a way while in this view that the ids can be rearranged in numerical order?
Tuesday, February 21, 2012 3:34 PM
A little more information is needed. First, what version of Project are you using? What view are you using?
I'm not quite sure what you are asking. If I sort a project by date, yes the IDs are most likely not going to be in order but then it's a sort so I wouldn't expect them to be. Under each grouping of dates, for example the sort includes summary lines and hierarchy was maintained, the IDs are in numerical order in each summary group. So what exactly do you want?
Tuesday, February 21, 2012 3:35 PMModerator
Tha answer as such is no, grouping conserves the task id, no way to automatically renumber. You could do something to getaa similare result though:
- Can you SORT the tasks befire the grouping such that they are in the order of the later grouping? If yes, you can sort with the option "permenently renumber tasks", then your IDs are OK before the grouping per se.
- If really necessary you could write, or have someone write, a VBA procedure putting the desired number in a Number field.
Tuesday, February 21, 2012 3:55 PM
First I am using Project 07.
I have a view set up where it reorganizes my schedule by week. Those weeks are displayed from MOn-Sun with a grouping and start date.
So naturally when I apply this view and get all my tasks organized by group (week) and start date the id's are then all mixed up.
I can imagine the answer is no.
Tuesday, February 21, 2012 4:05 PM
I am not sure that I understand exactly what you are saying.
But another thought occurred to me as well. I could do a custom number field start with 100 (or whatever) and do a formula in the customer number field to just go sequentually through the activities. And then lock that in my view as the id... Right?
I haven't figured out that formula yet but that should be easy????
Tuesday, February 21, 2012 4:40 PM
Sorry, I see you did already tell us you are using Project 2007.
When I asked with view you are using, is it a task type view (e.g. Gantt Chart), or combination type view (e.g. Task Usage).
I'm still not clear on your end goal. I thought of the idea of using an extra number field to get a consecutive sequence but without really understanding your end goal, it may or may not help. It would help if you showed us a screen shot of what you want (i.e. show enough of your view so we can see the sorted dates and then manually enter what you want into an extra number field).
It might be as simple as running the following VBA macro on your sorted view.Sub pennysort()
Dim t As Task
i = 1
For Each t In ActiveSelection.Tasks
If Not t Is Nothing Then
t.Number1 = i
i = i + 1
Tuesday, February 21, 2012 5:01 PM
Okay per the attached screen shot.
I have created a view called Day. It also has a grouping associated with it and a start order. But as you can see my ids are not in order because when I chose the day view it put them in start order rather than the original order I set the up in.
My thought was if there was any way to have these id numbers while in this day view to reorganize so they were sequential.
Tuesday, February 21, 2012 6:34 PMModerator
Formula can only address fields within the same task (and some project level fields), so your sequential solution doesn't work. You need VBA (such as in John's example).
John, I'm not sure you can address Number1 for a group by summary task. Maybe it's better to exclude them in the loop anyhow.
Tuesday, February 21, 2012 10:44 PM
Thanks for the screen shot, it shows us what you have but I am still not clear on what you want. Add the Number1 field to your Day view. Now run the macro I gave you. Does it give you what you want? If not, what is wrong with it?
Wednesday, February 22, 2012 12:00 AMModeratorIt looks like they actually are in ID order within the grouping. ID 12 cannot be between 11 and 13 because it occurs in week 1 and 11 and 13 are both in week 0.
- Marked As Answer by Mike GlenModerator Saturday, June 30, 2012 8:48 PM
Wednesday, February 22, 2012 6:04 PM
Thank goodness it's not just me :) I was worried that I couldn't count or something as I'm now confused - the grouping has been applied and the order is as per the ID within the grouping... Can you show us when you'd like to see it output and then maybe we can better understand the problem?
Friday, April 13, 2012 4:03 PMModerator
Please re-post if this is still an issue, or mark it as answered.
MVP Project (97 - 11)