Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Input a date and use it in a calculation 1

Status
Not open for further replies.

blmange

Technical User
Jan 23, 2004
2
US
I want to input a date via a filter and have it used in a calculation.

Forecast date of? XX-XX-2008 - User Input

Use this XX-XX-2008 and populate a date field in Project so I can calculate "Days Behind" based on the XX-XX-2008 date

Here's the formula:
round(([Early Finish]-[Early Start])*([% Complete]/100)-((XX-XX-2008)-Early Start]),0)

I was using the Current Date for the XX-XX-2008 date because anyone could tell if an activity was behind based on this formula.

However the Management request is to make the (XX-XX-2008) a variable, usually a following Wednesday to find out how far behind we will be if it is not statused.

I'm looking for an easy way to do this.

I have told management to just change the Current Date in the Project Pull Down but I was told it needs to be simpler.

So you see where I am going with this.

Thanks for any help.
 
In a FILTER you can ask for a user-defined value to be entered (including a date).

Project | Filtered for... | More filters
Select the Date Range filter
Click on the "Copy" button

You can see how this is done -- note the placement of the Question mark outside of the quoted field.

In a FORMULA you cannot ask for a user-defined value to be entered.

The solution is a two step process:

1. (Rather than using Current Date, I would use Status Date.) Create a VBA macro that prompts for a date value and then stores it in Status Date.

2. Create a button (on an existing toolbar or on a new toolbar) and attach the VBA macro to that button.

Now, simply click on the button, get the user-defined date value, store it into the Status Date field and your formula will do the necessary calculation.

 
Thanks.
I wrote a Macro and used the Current Date so I wouldn't have to change the formula. The next step was to open the specific View after inputting the change.

Seems to work out well.

However how do I get this new button onto another users Toolbar? Is there a thread that I can check to work this out?

Anyway thanks for the help. I appreciate all the help I can get.
 
It's easiest to put it on to an existing toolbar (and once you see how to do that, you'll be able to work out how to create a special toolbar and put it on that).

Tools | Customize | Toolbars | Commands-tab

Under "Categories" scroll down to "All macros" and click on it.
Under "Commands" scroll down to the macro you want and click on it.

Drag the macro up to a toolbar that is displayed. You'll see a Plus sign in a box to show you can add it; you'll see an X in a box when you can't.

When you drop it onto a toolbar, the "Modify Selection" button becomes active. Set the options there to meet your requirements.

The default is to place all of that into Global.mpt. If you want it exclusively in a specific project then it can be done but it's a bit of a pain to do -- and a lot of typing to describe.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top