+ Reply to Thread
Results 1 to 3 of 3

VBA code to find lookup value from two data sets.

  1. #1
    Registered User
    Join Date
    05-04-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    18

    VBA code to find lookup value from two data sets.

    Hi All,

    Respected Members please accept my sincere thanks for all your esteemed help given through this channel.

    I have attached a sample worksheet which I use in work. My aim is to find job nuumbers on sheet1 in the dataset on sheet 2(column A) and return the corresponding values iolumn B & C on sheet 2. Please note that one job number can be paid more than one time in the past months(eg. 3300023104), and therefore the requirement is to total the amount of money paid in all months, on a particular job reference. The output i require on sheet 1 is "month paid in" and "amount paid ". If a job is paid just once then simply get the month and amount on sheet 1. But i dont know if a paricular job like 3300023104 has been paid loads of times in several months, how can we list the months as well as the amount. If months is not possible then only amount can do...


    My objective is to find out how much money has been paid before on the jobs mentioned on sheet 1 column A (my current month invoice). I already have a vba code to trace any duplicates within column A on sheet 1. For instance job ref 3300023104 has been repeated a few times on sheet 1.

    Please advise at your convenience.

    Thank you
    Manav
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: VBA code to find lookup value from two data sets.

    data appears to be large. about 1600 rows.

    to check each ngm and also each month (there are nine months
    so the intersectiosn are 1600x9=14400 cells have to be checked.
    of course macro has been writen

    there re two macro test and testone
    testone is embedded in test
    SO YOU NEED TO RUN ONLY "TEST"

    attached file " excevba123 VB Challenge.xlsm" is AFTER running the macro
    to retest run "test" agains. becaue of 11400 cells it takes between one minute and one and half minutes

    the macros are in the module of the file and also repeated here

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    I am not an expert. better solutions may be available
    [email protected]

  3. #3
    Registered User
    Join Date
    05-04-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: VBA code to find lookup value from two data sets.

    I appreciate your prompt reply Mr.Venkat, thank you so much.

    Many Regards
    Manav




    Quote Originally Posted by venkat1926 View Post
    data appears to be large. about 1600 rows.

    to check each ngm and also each month (there are nine months
    so the intersectiosn are 1600x9=14400 cells have to be checked.
    of course macro has been writen

    there re two macro test and testone
    testone is embedded in test
    SO YOU NEED TO RUN ONLY "TEST"

    attached file " excevba123 VB Challenge.xlsm" is AFTER running the macro
    to retest run "test" agains. becaue of 11400 cells it takes between one minute and one and half minutes

    the macros are in the module of the file and also repeated here

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

+ 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