+ Reply to Thread
Results 1 to 10 of 10

Forward Pass and Backward Pass calculations

  1. #1
    Registered User
    Join Date
    10-18-2014
    Location
    south africa
    MS-Off Ver
    2010
    Posts
    5

    Forward Pass and Backward Pass calculations

    I need to calculate something called a certain dates using something called Forward Pass and Backward Pass Methods(see below). Using the table(found at the link at the bottom) as an example (however macro needs do calculations using the lastrow with data inputed for the range).
    Last edited by DesperateKid; 10-23-2014 at 09:03 AM.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VBA Help Please- Calculations

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: VBA Help Please- Calculations

    This is perfect for a custom object.
    The attached uses a custom object clsActivity

    It has read write properties
    Name
    ExpectedDuration
    ProjectTargetFinish
    ActualStart
    ActualFinish

    read-only properties
    Duration
    ActualDuration
    EarliestFinish
    EarliestStart
    LastFinish
    LastStart
    PreceedingActivities
    SubsiquentActivities

    and methods
    PreceedingActivitiesAdd
    SubsiquentActivitiesAdd

    The demo doesn't use the actuals. The demo takes the raw data (name, precedent action, expected duration, project target) from A:D
    and outputs the calculated properties in G:L
    Attached Files Attached Files
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  4. #4
    Registered User
    Join Date
    10-18-2014
    Location
    south africa
    MS-Off Ver
    2010
    Posts
    5

    Re: VBA Help Please- Calculations

    mike would you possibly be able to help me adapt this to my table, can add in any headings or anything needed. im a real newbie with VBA and im Struggling.

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VBA Help Please- Calculations

    Hi Kid,

    I can't see your dropbox - did you remove it?? But Mike's sophisticated solution looks to be excellent!

    To run it hit Alt + F8 and choose the macro named test and click on run.

    *as mike has said the input must be in columns A:D

  6. #6
    Registered User
    Join Date
    10-18-2014
    Location
    south africa
    MS-Off Ver
    2010
    Posts
    5

    Re: Forward Pass and Backward Pass calculations

    .

    Thanks so much for all the previous Help. You guys have been amazing
    Attached Files Attached Files
    Last edited by DesperateKid; 10-23-2014 at 09:02 AM.

  7. #7
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Forward Pass and Backward Pass calculations

    I've been thinking and there's a situation that confuses me.
    In my workbook, there are two processes "sew pants" and "sew shirt" that have to be completed before "box suit" is started. It doesn't matter what order and neither the pants nor shirt is necessary for the other.
    BUT, if the company has only one sewing machine, they can't be done simultaneously and "When many activities lead into one activity in the Forward Pass method, chose the highest EF date to calculate the ES date for the succeeding activity" doesn't work.

  8. #8
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Forward Pass and Backward Pass calculations

    In your attachment, the activities and their precedents were set up wrong.
    Each activity/precedent pair is on one line, the ExpectedDuration and the ProjectTargetFinish should be on the first line for that activity.
    Also, I noticed that you removed the ProjectTargetFinish. How does one calculate the LastFinish given that the LastFinish of the last activity is the Target deadline for the project.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    10-18-2014
    Location
    south africa
    MS-Off Ver
    2010
    Posts
    5

    Re: Forward Pass and Backward Pass calculations

    Mike I see where you coming from however, for my assignment your Forward pass method worked just fine, I guess in the assignment assumptions are made that it can be done simultaneosly as we are only using activity numbers and not specifics. The only problem I'm having with your coding is to adapt the backward pass method. Please if you are able would you mind assisting me with my previous reply.

    Thanking you

  10. #10
    Registered User
    Join Date
    10-18-2014
    Location
    south africa
    MS-Off Ver
    2010
    Posts
    5

    Re: Forward Pass and Backward Pass calculations

    Thanks Mike!! Just two questions, how would projecttarget finished be determined if it is not given? Could this be done using expected durations? Also would it be possible to make multiple preceding activity columns let's say 4?

    Thanks for being so helpful

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Use if statement for a range +4 and -4 and write PASS / NOT PASS
    By alexistkd in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-05-2013, 07:11 PM
  2. Replies: 3
    Last Post: 06-07-2012, 07:25 PM
  3. [SOLVED] Analyze Within An Array and Pass Back Once vs. Pass at each applicable Instance
    By AlvaroSiza in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-11-2012, 05:25 PM
  4. [SOLVED] Dataform - Forward/Backward Control
    By Jim May in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-04-2005, 08:05 AM
  5. [SOLVED] Backward and Forward Compatibility
    By Cathy in Florida in forum Excel General
    Replies: 3
    Last Post: 03-01-2005, 12:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1