+ Reply to Thread
Results 1 to 4 of 4

Matching Data from one sheet to data on another and returning a value

  1. #1
    Registered User
    Join Date
    05-12-2014
    MS-Off Ver
    Excel 2010/2013
    Posts
    2

    Matching Data from one sheet to data on another and returning a value

    Hi i'm trying to get excel to look at DateTime on sheet 2, find the same datetime on sheet 3 then print the value for any column for the appropriate row. The formula i've used is in column G of sheet 2:
    =IF(ISNA(INDEX(Sheet3!A2:G425654,MATCH(A2,Sheet3!$A$1:$A$425654,0),6)),"",INDEX(Sheet3!A2:G425654,MATCH(A2,Sheet3!$A$1:$A$425654,0),6))
    file uploaded to mega:
    https://mega.co.nz/#!fZdyATDK!CUQ71R...PoBrxM21PnoiAQ

    I'm wondering if anyone can help me with a VBA solution as the nested function is not giving me the right results..

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Matching Data from one sheet to data on another and returning a value

    Hi and welcome to the forum

    1st, just because the formula is not giving what you want, doesnt mean you need VBA. From the sounds of it, what you want is pretty standard stuff, and index/match sounds like the tool to use. On a side note, you could use IFERROR() instead of what you have there...
    =IFERROR(INDEX(Sheet3!A2:G425654,MATCH(A2,Sheet3!$A$1:$A$425654,0),6)),"")

    You say it is not giving the correct results, perhaps you need to absolute some of those ranges?
    =IFERROR(INDEX(Sheet3!$A$2:$G$425654,MATCH(A2,Sheet3!$A$1:$A$425654,0),6)),"")

    Also, not all members are able - or willing - to access files from file hosting sites, so please upload your sample WORKBOOK here
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    05-12-2014
    MS-Off Ver
    Excel 2010/2013
    Posts
    2

    Re: Matching Data from one sheet to data on another and returning a value

    Thanks for the welcome FDibbins, making the ranges absolute looks to solve the problem somewhat, i have millions of lines to run this on and the file sizes and processing time become outrageous, the smallest file i could manage was 3MB even with things stripped out.
    i thought since vBA prints results this could help speed up the task and decrease file size.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Matching Data from one sheet to data on another and returning a value

    VBA will should speed things up. I played with some of your formulas and streamlined a few things, see if this helps any...

    Sheet2

    G2=IFERROR(INDEX(Sheet3!$A:$F,MATCH(A2,Sheet3!$A:$A,0),6),"") copied down
    H2=IF(Sheet3!E2="","",INDEX($E:$E,MATCH(Sheet3!$A2,$A:$A,0))) copied down and across

    Sheet3

    I deleted column D, and in the "new" column D, used this, copied down...
    =IF(ABS(C2)>=6.5,1,0)

    Not sure how often your data is updated, but if stays the same at the top of the tables, maybe consider valuing the answers?

+ 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. Matching Data and returning a cell value
    By kav1050 in forum Excel General
    Replies: 2
    Last Post: 12-15-2011, 10:15 PM
  2. Replies: 2
    Last Post: 07-25-2011, 11:47 AM
  3. Replies: 4
    Last Post: 06-07-2010, 11:06 AM
  4. Replies: 5
    Last Post: 04-13-2007, 06:58 PM
  5. [SOLVED] Returning a Value by Matching Two Columns of Data
    By Christine Edwards in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-10-2006, 02:35 PM

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