+ Reply to Thread
Results 1 to 5 of 5

A script that satisfies a condition, to change the input column

  1. #1
    Forum Contributor
    Join Date
    03-21-2007
    Posts
    118

    A script that satisfies a condition, to change the input column

    I have the following script:

    Please Login or Register  to view this content.
    I have two worksheet, one with the data, another with the results.

    This script will lookup up the values FROM column A IN column A and print out the result in the other sheet.

    I want to change that and have a column in the other sheet (longer than my column A of sheet1, with the same data though in different sequence and multiple times) and lookup up the values from the new column up in Sheet1 table it continues to do right now.

    Have a look at the zip and let me know your suggestions.

    Regards,

    K.
    Attached Files Attached Files

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

    Try this one.


    Please Login or Register  to view this content.

    rylo

  3. #3
    Forum Contributor
    Join Date
    03-21-2007
    Posts
    118
    Rylo,

    Thank you for the reply. Although the script you provided is succesful in taking into account the right column it will not return the correct results. I believe this is due to the nature of what I am trying to do.

    What I want it to do is to lookup the value at Sheet2ColumnA against Sheet1ColumnA. When it finds it then move to the next value in Sheet1ColumnA and test the formula there. If the formula condition isn't satisfied then move on to the next name, and to the next, until it finds one that satisfies the condition. If it doesn't find one then retun blank and move to the next vaue at Sheet2columnA.

    I believe this explains what I want to do a bit better. That's the reason why the script I provided is made in such a way, so that it loops until finding the correct answer (searching downwards, not just any answer).

    I also noticed that in the script you provided it would stop returning any solutions a few cells before all the values at Sheet2ColumnA were checked.

    Is there a way that you could tweak the original script to make it work? I don't want to eat up your time making new scripts.

    Regards,

    K

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

    Sorry, don't really follow.

    Can you update your example file with the expected results, and explain why that result was returned. When I process the file, I found that you had a couple of names (HUGO from memory was one) that gave a result, but the calculation didn't return a value of <= 3600, so I didn't include that name in the output.



    rylo

  5. #5
    Forum Contributor
    Join Date
    03-21-2007
    Posts
    118
    Rylo,

    Thank you very much for all your help. I understand it's quite a complex thing I'm trying to achieve and unless I could show/guide someone through the process it's hard to precisely explain it.

    At the moment one of my friends has volunteered to re-write the whole script according to the specifications of the original master-worksheet so, fingers crossed, everything will work out.

    I again really appreciate you effort and time. I have learned a lot from the script you posted.

    Regards,

    K.

+ 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