+ Reply to Thread
Results 1 to 33 of 33

Calculate by Match Criteria between Start/End Cells

  1. #1
    Forum Contributor
    Join Date
    04-09-2015
    Location
    Jamestown, TN
    MS-Off Ver
    2010
    Posts
    111

    Calculate by Match Criteria between Start/End Cells

    Hi all,
    I started a new post on this with a much simpler sample than previous. Seeking a number extracted between two columns, between 2 matched rows. Sample comments are in RED!

    Thanks
    Dave
    Attached Files Attached Files

  2. #2
    Forum Contributor jayajaya_4's Avatar
    Join Date
    05-09-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    259

    Re: Calculate by Match Criteria between Start/End Cells

    hey dear..can I know what is the final output needed...I need a bit more clarification on ur calculation...

  3. #3
    Forum Contributor
    Join Date
    04-09-2015
    Location
    Jamestown, TN
    MS-Off Ver
    2010
    Posts
    111

    Re: Calculate by Match Criteria between Start/End Cells

    Hi Jayajaya,

    The final output would be a #(The Amount of Days in) of MAX F - MIN D between the Criteria I specified.
    Thanks
    Last edited by davidpierce; 05-14-2015 at 03:29 AM.

  4. #4
    Forum Contributor
    Join Date
    04-09-2015
    Location
    Jamestown, TN
    MS-Off Ver
    2010
    Posts
    111

    Re: Calculate by Match Criteria between Start/End Cells

    I forgot I hid column B so when I reference Col B, it is actually Col C
    Me Bad
    Last edited by davidpierce; 05-14-2015 at 03:30 AM.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculate by Match Criteria between Start/End Cells

    Surely the min date is ALWAYS going to be E7, simplifying everything... I used this approach a day or two back on another similar problem for you. How's this? I've left the intermediate steps in (for now).
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  6. #6
    Forum Contributor jayajaya_4's Avatar
    Join Date
    05-09-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    259

    Re: Calculate by Match Criteria between Start/End Cells

    ok ur column d doesn't contain any data??? a bit confusing even if I get max of end date,min of start date what after dat ....?after doing that I am getting =(MAX(F7:F22)-MIN(E7:E22))

  7. #7
    Forum Contributor
    Join Date
    04-09-2015
    Location
    Jamestown, TN
    MS-Off Ver
    2010
    Posts
    111

    Re: Calculate by Match Criteria between Start/End Cells

    Hi Glenn
    Thank you and just wondering if we can get it not to calculate the rows 7 - 10 in column E in Sample? Everything else works great
    Thanks
    Last edited by davidpierce; 05-14-2015 at 03:48 AM.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculate by Match Criteria between Start/End Cells

    The way it's set up is that it's using a "complicated" match to get the end date from the row before the completion date row (Column F). The start date is taken from E7. Is it possible for there to be dates elsewhere that are BEFORE the date in E7? If you think that the formatting change in e11 to E18 has anything to do about it - it hasn't. That was just me "thinking aloud".

    Or have I picked you up incorrectly?

  9. #9
    Forum Contributor
    Join Date
    04-09-2015
    Location
    Jamestown, TN
    MS-Off Ver
    2010
    Posts
    111

    Re: Calculate by Match Criteria between Start/End Cells

    Here are my though in the calculation. When I schedule a project, we have a mobilization time which is really not included in the actual working dates of the schedule, however, they do reflect general conditions and need to be on schedule. I need to get to the actual starting date of schedule which in this case would be Col A "2". Would it help if there was lets say a "start Date" Field on the page. Lets Say Schedule starts 2/18, any date before this would not be calculated? Would that help with formula. So, when I schedule Mobilization and it's dates are less than 2/18, then they would not affect this calculation making the MIN Date still remain 2/18?
    Thanks
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    04-09-2015
    Location
    Jamestown, TN
    MS-Off Ver
    2010
    Posts
    111

    Re: Calculate by Match Criteria between Start/End Cells

    Hi Glenn,
    I made a start date and changed $E$7 to $E$2 and that seams to work just fine, however may need a msg box if a date is entered in the section selected, to say, "date is before starting date" so it will give an error and notify user? What are your thoughts on that possibly?
    Thanks
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    04-09-2015
    Location
    Jamestown, TN
    MS-Off Ver
    2010
    Posts
    111

    Re: Calculate by Match Criteria between Start/End Cells

    I guess that doesn't actually work either as changing that to $E$2 then it wont subtract them within the criteria MIN date? I don't know! Any thoughts on how to accomplish this?
    Thanks
    Dave

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculate by Match Criteria between Start/End Cells

    OK. So.... f I understand you. the preparatory work doesn't count. You only want to start the count once the boots hit the ground. Isn't that always going to be E11? If so, why complicate things by having ANYTHING in E2, and just set E11 to be the last erm in the formula? That's what I had originally (the brown shaded cells) until I read your requirement again and thought that you wanted the minium value of column E.

  13. #13
    Forum Contributor
    Join Date
    04-09-2015
    Location
    Jamestown, TN
    MS-Off Ver
    2010
    Posts
    111

    Re: Calculate by Match Criteria between Start/End Cells

    Hi Glenn,
    Yeah, I need the MIN of E but only between the criteria. Row 11 will change but not the criteria. The Number 2 will always be in some row weather it be in 11, 19, 25...

    The only thing I have in this for criteria that wont change is the Col A #2 and Col C project completion. I may add 1000 task between those two and I may add above and below them, but I don't want to calculate what comes before and after that, just between, yet I just cant remove them from the schedule if that makes sense to you

    I cant imagine there is not a formula that will start the count based on matching Col A and #2 and between Col B PC.

    I do need to seek a formula from VBA? That may be simpler?

    Thanks

  14. #14
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculate by Match Criteria between Start/End Cells

    OK. I now understand why (I think) we need to calculate MIN. Leave it with me...

  15. #15
    Forum Contributor
    Join Date
    04-09-2015
    Location
    Jamestown, TN
    MS-Off Ver
    2010
    Posts
    111

    Re: Calculate by Match Criteria between Start/End Cells

    Hi Glenn,
    Yeah, I need the MIN of E but only between the criteria. Row 11 will change but not the criteria. The Number 2 will always be in some row weather it be in 11, 19, 25...

    The only thing I have in this for criteria that wont change is the Col A #2 and Col C project completion. I may add 1000 task between those two and I may add above and below them, but I don't want to calculate what comes before and after that, just between, yet I just cant remove them from the schedule if that makes sense to you

    I cant imagine there is not a formula that will start the count based on matching Col A and #2 and between Col B PC.

    I do need to seek a formula from VBA? That may be simpler?

    Thanks

  16. #16
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculate by Match Criteria between Start/End Cells

    Oh No I Don't....... Am I looking for the date on which the boots hit the ground (i.e. matching "Site work" in B, on whatever row that might happen to be), or the lowest date in column E?

  17. #17
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculate by Match Criteria between Start/End Cells

    Your post at #15 appears to be a system duplicate. I have ignored it. can you answer my Qs at Post #16?

  18. #18
    Forum Contributor
    Join Date
    04-09-2015
    Location
    Jamestown, TN
    MS-Off Ver
    2010
    Posts
    111

    Re: Calculate by Match Criteria between Start/End Cells

    Sure will, thank you Glenn
    Dave

  19. #19
    Forum Contributor
    Join Date
    04-09-2015
    Location
    Jamestown, TN
    MS-Off Ver
    2010
    Posts
    111

    Re: Calculate by Match Criteria between Start/End Cells

    I sure will Glenn and Thanks a bunch!

  20. #20
    Forum Contributor
    Join Date
    04-09-2015
    Location
    Jamestown, TN
    MS-Off Ver
    2010
    Posts
    111

    Re: Calculate by Match Criteria between Start/End Cells

    Sorry Glenn, I missed this post! In any event, I am looking for the boots on the ground such as "Site Work in B" yet I went with the "#2 in A" as site work wont always be site work. It depends on project what it start with but the #2 will always be the boots on the ground. The #2 is txt!

  21. #21
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculate by Match Criteria between Start/End Cells

    Arrgghh I forgot about you... Is this it? It's finding "the row of "site work" in C; returing the corresponding date from E and subtracting that from the previously agreed completion date. I'm here for an hour or so, before pub time comes around...
    Attached Files Attached Files

  22. #22
    Forum Contributor
    Join Date
    04-09-2015
    Location
    Jamestown, TN
    MS-Off Ver
    2010
    Posts
    111

    Re: Calculate by Match Criteria between Start/End Cells

    Hi Glenn,
    This does work however is there a way to get the "2" in col a instead of Site Work in col C? The "2" in col A will always be the same "2" but Site work may change to Demolition..... depending on what type of project we are doing.
    Thanks

  23. #23
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculate by Match Criteria between Start/End Cells

    Dohh! The penny drops...
    Attached Files Attached Files

  24. #24
    Forum Contributor
    Join Date
    04-09-2015
    Location
    Jamestown, TN
    MS-Off Ver
    2010
    Posts
    111

    Re: Calculate by Match Criteria between Start/End Cells

    That is perfect Glenn, thank you so much! Now I will figure out how to get the NETWORKINGDAYS out of that calc and will be wrapped up!

    Thanks
    Dave

  25. #25
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculate by Match Criteria between Start/End Cells

    That shouldn't be difficult... Like this, maybe?
    Attached Files Attached Files

  26. #26
    Forum Contributor
    Join Date
    04-09-2015
    Location
    Jamestown, TN
    MS-Off Ver
    2010
    Posts
    111

    Re: Calculate by Match Criteria between Start/End Cells

    Well now isn't that just fantastic! Thanks so much Glenn! You are just great at what you do, that's for sure.
    Dave

  27. #27
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculate by Match Criteria between Start/End Cells

    Another satisfied "customer"... thanks!

  28. #28
    Forum Contributor
    Join Date
    04-09-2015
    Location
    Jamestown, TN
    MS-Off Ver
    2010
    Posts
    111

    Re: Calculate by Match Criteria between Start/End Cells

    Hi Glenn,
    I took your formula and changed it to fit my actual schedule sheet I am using and getting an error #N/A. I have checked and checked the difference in formulas and the only thing that has changed is the columns and rows. Any idea why I am getting this error? I attached the actual file I am using. Your formula is in cell "L2"
    Thanks
    Dave
    Attached Files Attached Files

  29. #29
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculate by Match Criteria between Start/End Cells

    Hopefully this is it.

    1. The problem was (probably) that I took a shortcut in the dummy sheet setting the startin point of the range from boots-on-ground to project completion. I've fixed it by getting it (again) to search for a 2 in the left hand column.

    2. The formula also got a bit confused 'cos you have 2 entered as text, in the LH column, not as a number. That's fine, but I needed to get the formaul to look for a text 2 instead of a number 2 (the joys of Excel...).

    3. The starting point for looking at the boots-to completion date had somehow wound up as being row 26. That was fixed by the actions at 1), above.

    4. The 6 that was added to the range row to return the sheet row had not been changed from 6 (dummy sheet) to 11 (real sheet).

    Any other teething probelems, just shout...
    Attached Files Attached Files

  30. #30
    Forum Contributor
    Join Date
    04-09-2015
    Location
    Jamestown, TN
    MS-Off Ver
    2010
    Posts
    111

    Re: Calculate by Match Criteria between Start/End Cells

    Thanks Glenn,
    Sure something will come up before I am all done, LOL!
    Thanks again,
    Dave

  31. #31
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Calculate by Match Criteria between Start/End Cells

    It's bound to...

  32. #32
    Forum Contributor
    Join Date
    04-09-2015
    Location
    Jamestown, TN
    MS-Off Ver
    2010
    Posts
    111

    Re: Calculate by Match Criteria between Start/End Cells

    Hi Glenn,
    I am having a major problem trying to get a couple of other formulas to work on this. If I could get you to assist me that would be great since you are familiar with the whole project so far. Sample Attached "MySample8"

    I am trying to get "G7- (Max F - Min D)" From our boots on the ground day, "2" Site Work, Row 26 this sample" all the way to "Row 49, this sample" and put that result in "L4" Scheduled Lag Days. I tried this but it really doesn't work correctly and cant figure out how to subtract the G7 before it?
    =MAX(INDIRECT("F"&11+MATCH("2",$A$12:$A$49,0)&":F"&11-1))-INDIRECT("D"&11+MATCH("2",$A$12:$A$49,0))

    Second, I am trying to Do a "Rounddown for a total of G Column * total of L Column, from our boots on the ground day, "2" Site Work to the end, row 49, this sample" and put result in "O5"

    And Finally, I am trying to "Max Days Column E - Max Days in Column L" from our boots on the ground day, "2" Site Work to the end, Row 49, this sample and the result of that would go in "O7".
    Attached Files Attached Files

  33. #33
    Forum Contributor
    Join Date
    04-09-2015
    Location
    Jamestown, TN
    MS-Off Ver
    2010
    Posts
    111

    Re: Calculate by Match Criteria between Start/End Cells

    Glenn,
    I was thinking that maybe I am making these last calculations harder than they need to be? I don’t know how to write the formulas, but here is what I am thinking may work?

    Scheduled Lag Days (L4)
    =E10 which is =IFERROR(MAX(F12:F50)-D10+1,0) - G7
    If any dates in Column D are >= (This would be for all dates being >=F3)
    Start Date (F3)

    “L4 =G7- E10 If D10:D50 >= F3” Something like this? So any date that is before F3 will not calculate!

    Completed Days (O5)
    =J10 Which is =ROUNDDOWN(G10*L10,0)
    If any dates in Column M are >= (This would be for all dates being >=F3)
    Start Date (F3)

    “O5 = J10 if M10:M50 >= F3” So, if any dates in Column M are before F3 they will not claclulate!

    Loss/Gain -/+ (O7)
    "=(F10-N10)-(D10-M10) if Column D10:D50 or M10:M50 is >= F3" So if any dates in Col D or M is less than F3 they wont calculate!

    I don’t know if this would be simpler or not but it seams to me it would be workable? Basically they all add the whole column with exceptions to dates before the start date! If that makes sense?

    Thanks
    Dave
    Last edited by davidpierce; 05-19-2015 at 08:27 PM. Reason: Correction

+ 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. [SOLVED] Identify the pair and calculate the time difference if certain criteria match
    By Chippi in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-10-2014, 07:00 AM
  2. Replies: 9
    Last Post: 06-25-2013, 09:00 AM
  3. [SOLVED] Calculate cells based on multiple criteria
    By jealkon in forum Excel General
    Replies: 7
    Last Post: 07-11-2012, 02:26 PM
  4. Replies: 5
    Last Post: 09-22-2009, 06:11 PM
  5. evaluate two cells and calculate based on criteria
    By galiant in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-10-2006, 11:34 AM

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