+ Reply to Thread
Results 1 to 7 of 7

Help with a Do Loop that runs off a VLookup and a Pick list

  1. #1
    Registered User
    Join Date
    02-06-2012
    Location
    roswell
    MS-Off Ver
    O365
    Posts
    95

    Help with a Do Loop that runs off a VLookup and a Pick list

    Hi,
    I have a complicated equation that I can not isolate the parameter by itself to solve for it. So I have to compare the result to a minimum result and increment the parameter via a VLookup (can be repalced by a list if needed) up to the minimum result. when that value goes over the minimum, i need to return the parameter

    I hope I explained it well enough. Unfortunately, the person wants the VBA code to tell him the parameter rather than pick it from a pick list until the formula says the minimum has been reached

    Something like this (B98 is comparing the result to the minimum, once it reaches the minimum, it will say "piping OK"
    Please Login or Register  to view this content.
    Last edited by Leith Ross; 06-13-2012 at 07:04 PM. Reason: Added Code Tags

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Help with a Do Loop that runs off a VLookup and a Pick list

    Hi

    Got some sort of example file so we can see what your process is and what you are trying to achieve.

    rylo

  3. #3
    Registered User
    Join Date
    02-06-2012
    Location
    roswell
    MS-Off Ver
    O365
    Posts
    95

    Re: Help with a Do Loop that runs off a VLookup and a Pick list

    It is attached- I need to go thru the pull down list values which correlate to the table to pull the actual value to use in the calculation
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Help with a Do Loop that runs off a VLookup and a Pick list

    Hi

    The example file list and the list in the drop down don't seem to align, so I couldn't test this properly. If you can modify your example file so that it will run from the listing in I8:J19 then try something like:
    Please Login or Register  to view this content.
    HTH

    rylo

  5. #5
    Registered User
    Join Date
    02-06-2012
    Location
    roswell
    MS-Off Ver
    O365
    Posts
    95

    Re: Help with a Do Loop that runs off a VLookup and a Pick list

    Hi rylo,
    trying to get the code to work no dice The drop down list in B3 is in effect I8:I19. It's just i need to use the adjacent value in column J for the calculation. So i want to walk the values in I8:I19 until I get "Pipe Length is OK"- does that help?
    Last edited by delaneybob; 06-13-2012 at 09:56 PM.

  6. #6
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Help with a Do Loop that runs off a VLookup and a Pick list

    838102.xlsmHi

    I've modified your file and put revised details in column C. The list is now linked to the data in J8:J19. I've modified the vlookup formula so that it will still work.

    There is a macro called DeterminPipeSize which will get the first valid result and put it into C3.

    rylo

  7. #7
    Registered User
    Join Date
    02-06-2012
    Location
    roswell
    MS-Off Ver
    O365
    Posts
    95

    Re: Help with a Do Loop that runs off a VLookup and a Pick list

    Many many thanks- I got the jist of the code and it rocks!

    I feel wierd not paying- is there a donation site?

+ 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