+ Reply to Thread
Results 1 to 6 of 6

Help with a Vlookup/max type situation

  1. #1
    Registered User
    Join Date
    02-11-2009
    Location
    Newport, Michigan
    MS-Off Ver
    Excel 2003
    Posts
    7

    Help with a Vlookup/max type situation

    OK. The following spreadsheet I have attached is a drainage design spreadsheet. On Tab 3-Pipe Design, there is column R - time of concentration.
    Cell R32 is representative of how the formula for time of concentration must work, ie. the maximum time of concentration must be used. Cell R37 shows how I would like it to work (or atleast my attempts) so that excel finds the maximum TofC automatically.

    The reason for this: redesigning a storm system can be very cumbersome. We had the spreadsheet, but adding a manhole in the middle of a pipe run resulted in a lot of re-work. I set out to find a way to make adding manholes / revisions more automated with excel by trying to break down components and re-combine them.

    Each trunkline may have lateral sewer leads that feed it (think of a road side drainage system). The time of concentration is basically how much time it takes the water to get from manhole A to manhole B. Now if I have 2 lines that connect to manhole B (think of a Y-connection), where Manhole A connects to B and Manhole C connects to B. I want the excel function to find which run (a-b or c-b) has the max TofC and use that value.

    Please see my spreadsheet from rapidshare (the attach function below would not work)

    http://rapidshare.com/files/19700626...plate.zip.html


    P.S. I did try indexing - see far far far right side of worksheet. But, I was unsuccessfull.


    I am open to any suggestions.

    thank You.

    Chris

  2. #2
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: Help with a Vlookup/max type situation

    2 things.

    For VLOOKUP to work, the left-most column must be sorted in ascending order.

    Secondly
    You can't lookup things that aren't there. Cell R33 is:
    Please Login or Register  to view this content.
    D33 is EX2

    There's no "EX2" in Column D, rows 183 to 600.
    =IF(AND(OR(BLONDE,BRUNETTE,REDHEAD),OR(MY PLACE,HER PLACE),ME),BOW-CHICKA-BOW-WOW,ANOTHER NIGHT ON THE INTERNET)

  3. #3
    Registered User
    Join Date
    02-11-2009
    Location
    Newport, Michigan
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Help with a Vlookup/max type situation

    yes that is correct.

    What I am trying to accomplish is this:

    On some laterals for instance Number 2 (D42 & D197 & D215) it will need to evaluate these three to return a max value (from corresponding R42,R197 & R215), BUT in other instances (EX2) it should just add the R32 to AH32 (and enter this number into R33) (because there are no other EX2 laterals on the spreadsheet).

    Is that more clear?

  4. #4
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: Help with a Vlookup/max type situation

    Aaahhh..
    So you're counting on the vlookup of column D to sometimes come back as an error, and would like that treated as 0, so that the other value is greater, and therefore used in the calculation, correct?

  5. #5
    Registered User
    Join Date
    02-11-2009
    Location
    Newport, Michigan
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Help with a Vlookup/max type situation

    Yes to your reply above..that is what I want in general.

    ---------------------------
    I found this link last night.

    This kind of is what I am looking for...in a round-about way.

    http://www.mrexcel.com/archive/Formulas/24205.html

    I want to look up manholes (ie EX 2 or number 2 or whatever is in Column D) and compare values in the R column for the looked up manhole in column D. I then want to compare the values of col R and output the max value to the cell below (in column R).

    I'm hoping in the end that I don't creat circular references. I guess that's the big part to figure out.

  6. #6
    Registered User
    Join Date
    02-11-2009
    Location
    Newport, Michigan
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Help with a Vlookup/max type situation

    by the way...the above link I provided...worked perfect for what I needed.

    It helped me to compartmentalize the individual numbers, compare them, use max values, then recombine them. worked quite nicely!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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