Loading...
Quick Links

How To Display Lag between Tasks in Your Gantt Chart

By default, the lag set between tasks is displayed in the Predecessor column of the Gantt chart view. Neither Microsoft Project 2007 nor Project 2010 has a separate field to display the lead or lag of specific tasks.

You can display the lag as a separate field by following these steps:

  1. In Project 2007 choose Tools, Customize Fields. In Project 2010 choose Project ribbon | Custom Fields in the Properties group.
  2. In the Custom Fields dialog, select the Task radio button. Then choose the Type drop down and select Text.
  3. Select Text1 and click the Rename button. Change the name to “Lag” and choose OK. This will display “Lag (Text1).”
  4. Click the Formula button of Custom attributes, enter the following formula, and click OK:IIf(InStr([Predecessors],”+”)<>0, Mid([Predecessors],InStr([Predecessors],”+”),Len([Predecessors])), “”)You’ll get a warning message that existing data in the Lag field will be deleted because now all values will be calculated by the formula. Click OK.
  5. Insert a column with the Field name as Lag (Text1) in Project 2007 by choosing Insert | Column. In the Field name dropdown, choose Lag (Text1). In Project 2010, just right-click on the column next to which you want the new column added and choose Insert Column. Scroll down to Lag (Text1) and select it.

How To Display Lag between Tasks in Your Gantt Chart

You may be wondering about that formula I’ve asked you to enter. What does the code mean?

For the purposes of illustration, let’s say the lag between Prepare and Review tasks is 1FS+2days (translated to: “The task is planned to Start with a lag time of two days after the Finish of its predecessor task”).

The part of the code that specifies:

InStr([Predecessors],”+”)

returns the position of + in the [Predecessors] field. That’s four in the example shown in the screenshot.

This code:

Mid([Predecessors],InStr([Predecessors],”+”),Len([Predecessors]))

extracts the text from + to the end of the string, which is “+2days.”

If you want display the lag to the right or left of the task bar, follow these steps:

  1. In Project 2007 choose Format | Bar Styles. In Project 2010, choose Format ribbon | Bar Styles in the Bar Styles group.
  2. Select the rows in the top area that you want the lag displayed next to.
  3. Select the Text tab in the bottom and choose the dropdown for Left or Right.
  4. Select the field name Lag (Text1) and press OK.
Sai Prasad
Written by Sai Prasad

B Sai Prasad, PMP®, PMI-SP®, MVP Project, Senior Manager – Learning & Development, has been with service provider Cognizant Technology Solutions India Pvt. Ltd since 2001 where he was named winner of the company’s Global Trainer of the Year award. He has spent 13,000-plus hours in mentoring, coaching, training 9000-plus practitioners on project management topics ranging from project management concepts, project risk management, project scheduling, Microsoft Office Project® to software estimation techniques.

He is a Champion of Project Management from PMI India and also Associate Champion Advisory Committee, PMI India. He is awarded the Champion of the Quarter (Q4 – 2012) and Delivery Excellence Award (2011-2012, 2012-2013) from PMI India. He’s also the editor of the project management book, Forecast Scheduling with Project 2010. He is a Microsoft Certified Technology Specialist (MCTS) in Project 2010. He is the President of the MPUG India Chennai chapter to promote and help practitioners on how to effectively use Microsoft Office Project.

Share This Post
9 Comments
  1. Sai,

    Question regarding lag/float between two tasks. When a predecessor has 10 days lag between it’s successor, but the predecessor is late then starts to eat into the lag time, how do you plug this into MS project where the predecessor doesn’t push the successor task out each day it’s late? I’ve scoured the net trying to find how to automatically manage this. Right now I continue to just push my successor even though I know there is a float time between finish of task A and start of task B.

    (1) Predecessor Task A – 5 Days
    (2) Successor Task B – 19 Days (1FS+10)

    Reply
  2. Sai Prasad

    Jay,

    Lag is a wait time between dependent tasks. That is, any delay on the predecessor will affect the successor start. If you want the predecessor not to push the successor then set a constraint on the successor task to start on a particular date.

    Constraints restricts a task to start/finish by a given date. To set the constraint, right click the task name, click Information. Click Advanced tab, and change the constraint type to either Start No Earlier than or Must Start On – though the later is hard constraint – and set the constraint date.

    Hope this answers your question.

    Thanks,
    Sai, PMP, PMI-SP, MCTS (Project)

    Reply
  3. Sai Prasad

    Jay – One more point. You used the term lag/float. They are different.

    Lag is the wait time between linked tasks (you set this in Predecessors column). This is set by the user.

    Float (Project calls it slack) is used in critical path method. Float is the number of days a task can be delayed without affecting the project finish date. Float is calculated by Project by comparing the late start with the early start each task. To see the float, insert a column with the field name Total Slack

    Regards
    Sai

    Reply
  4. Hi, I’ve tried to make this work but I keep getting syntax errors when cutting and pasting the equation. I have checked that I am not cutting and pasting anything either side of the equation. Can you help? I realise this is an old post – but its the only one on the internet that has addressed this issue. Thanks

    Reply
  5. Activity Time (Weeks) Preceeding Activities
    A. Obtain schedule of liabilities 3 None
    B. Mail confirmation 15 a
    C. Test pension plan 5 a
    D. Vouch selected liabilities 60 a
    E. Test accruals and amortisation 6 d
    F. Process confirmations 40 b
    G. Reconcile interest expense to debt 10 c, e
    H. Verify debt restriction compliance 7 f
    I. Investigate debit balances 6 g
    J. Review subsequent payments 12 h, I

    Given the schedule in the table above for a liability work package done as part of an accounting audit in a corporate office, find:
    The critical path
    The slack/float time on ‘process confirmations’
    The slack time on ‘test pension plan’
    The slack time on ‘verify debt restriction compliance’

    Reply
  6. Hi sir. Can u say me how to see how to see the expected date to complete while updating the project with delay. How to see the effect of delay in Gantt chart.

    Reply
  7. To make this work, I had to replace the quotation marks in the formula. The HTML used has curved quotation marks and these were not recognized in Project 2013. When I typed the normal quotation marks over these throughout the formula, it worked like a charm.

    Reply
  8. Followed Jonathan Turner’s lead and it worked for me too, thanks guys, really useful

    Reply
  9. IMPORTANT UPDATE !!!!!!!!!!!!!!!!!!!!!!

    Unfortunately, MS Project 2013 does not work with this formula and may show an error. If you do encounter this error, please use the following formula:

    IIf(InStr([Predecessors],’+’)0,Mid([Predecessors],InStr([Predecessors],’+’),Len([Predecessors])),”)

    Reply

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Please complete this equation so we know you’re not a robot. *

Thanks for submitting your comment!
You must be logged in to comment.