+ Reply to Thread
Results 1 to 11 of 11

Excel Offset Match Match - Help

  1. #1
    Registered User
    Join Date
    04-13-2016
    Location
    Chicago
    MS-Off Ver
    2010
    Posts
    5

    Excel Offset Match Match - Help

    Hi guys, long time reader - first time poster.

    I am having trouble searching & matching in an array in Excel - from what I read, I think OFFSET with nested MATCH's should do the job, I just can't wrap my head around how to do it.

    The output table has the following form:

    Date1 Date2
    a X Y
    b Z M
    c ... ...
    d ... ...
    e ... ...
    f ... ...

    So I am looking for X, Y, Z, M etc....using offset match in those cells.

    The table that holds the data is where it is tricky. And it comes from another source, so I can't easily manipulate it. It looks as follows:

    a BBG b BBG c BBG
    Date1 X Date1 Z Date1 #
    Date2 Y Date2 M Date2 #
    Date3 # Date3 # Date3 #

    So for each security (a,b,c...) there are two columns...the first that holds the date and the 2nd column has the data (all the #'s) I'm looking to have in the output table as X,Y,Z. There are no blank columns, its always "a" followed by BBG (which is just the heading of the data identifier - it can be blank if not needed) then the next security "b" and so on... Not sure what the easiest way to search through would be.

    I hope this is clear; appreciate the help.
    Last edited by AFarAviv; 04-13-2016 at 11:11 AM.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Excel Offset Match Match - Help

    It would help a lot if you could attach a sample workbook with a "this is what I got" and a dummied up "this is what I want it to look like."
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    04-13-2016
    Location
    Chicago
    MS-Off Ver
    2010
    Posts
    5

    Re: Excel Offset Match Match - Help

    I have attached a sample spreadsheet. Input tab has the raw data. Output - highlighted yellow cells should have the results. I've added a few manually to see what it should like
    Hope this helps. Thanks
    Attached Files Attached Files

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Excel Offset Match Match - Help

    I am assuming that the Corps are "fixed." I added a helper column to identify the column in which the Corp is found. This could be rolled back into the basic formulas, but it just makes them bigger.

    Once I found the column the corp was in, then it was a matter of crafting the Offset command. I made the assumption that there would be no more than 400 rows of data. You can extend this if you wish. I did a match for the date in the range pointed to by the offset command. This gives me the row.

    From there it was a matter of using INDEX to dig out the value. I gave a static name to the block of data $B$1:$S$400.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-13-2016
    Location
    Chicago
    MS-Off Ver
    2010
    Posts
    5

    Re: Excel Offset Match Match - Help

    Thank you -
    I had a quick look at the numbers; it seems to pulling data one day later. i.e. for 4/12/2016 the data I'm seeing is from 4/13/2016.
    Also, I forgot to mention, I have extra columns in the in the Input file, before the data starts. So the data array starts in cell F1. Which seems to cause an issue with your formula-but it looks like its close.
    I've attached a new spreadsheet that has the correct formatting of the data - which wont change. If you can help. much appreciated
    Attached Files Attached Files

  6. #6
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Excel Offset Match Match - Help

    I was off in a couple of places. I had to subtract 4 from my column number to align the table with the physical page and I forgot that match starts counting at 1 and offset starts counting at zero, so I hade to subtract 1 from the date row found by Match.
    Attached Files Attached Files

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Excel Offset Match Match - Help

    This fills in your chart on the Output worksheet by using charts produced on Sheet3 that extracts the data for each corporation in one table then extracts the matching dates in a second table. Offset is then used to extract the data that matches the corporation with the dates that you have in row 2 of the Output worksheet.

    To extract the corporation names from the Input table this was entered in Sheet3!A2 and filled down
    FORMULA 1
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I didn't remove any of the values in the columns that you had in the Output worksheet that were not in the small table.
    To extract the corporation values from the Input table this was entered in Sheet3!B2 and filled down and across. This extracts all the values from the Input worksheet.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    A second table was created on Sheet3 that extracted all the dates appropriate to each corporation.
    Enter the above FORUMULA 1 in Sheet3!A12 and fill down.
    To extract the dates enter this in Sheet3!B12 and fill down and across
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    On the Output worksheet B5 enter this formula and fill down and across. This matches the corporation with the date and extracts the value from the tables on Sheet3
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  8. #8
    Registered User
    Join Date
    04-13-2016
    Location
    Chicago
    MS-Off Ver
    2010
    Posts
    5

    Re: Excel Offset Match Match - Help

    Hey dflak,
    much appreciated - works great on that sheet. when i try to replicate in my original sheet (which does have not text data; but forumlas and references) it doesnt seem to work. I can't seem to figure it out so I'm just attaching the actual sheet. The #REF's are irrelevant; all the formatting/columns should be in line...I'm thinking it has to do with the cell type..but just a guess.
    First tab. CreditSpreadHistory; I highlighted the yellow cells (currently contain 'xx' with your formula). Data in BDH tab.
    Really do appreciate your help on this.
    Attached Files Attached Files

  9. #9
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Excel Offset Match Match - Help

    I think I see the issue. It's this formula: =MATCH(B5,BDH!$F$1:$XFD$1,0)

    Change BDH!$F$1:$XFD$1 to BDH!$1:$1 ... or ... Change the -4 in the offset formula to -1 (I think - I always have to play around with these things).

    I started counting from the first row and made the adjustment between the named data range and the physical sheet columns in the Offset formula. You can start counting from the first column of data in which case the only adjustment you have to make is for the fact that MATCH starts counting at 1 whereas Offset starts counting at zero.

  10. #10
    Registered User
    Join Date
    04-13-2016
    Location
    Chicago
    MS-Off Ver
    2010
    Posts
    5

    Re: Excel Offset Match Match - Help

    works like a charm! thanks

  11. #11
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Excel Offset Match Match - Help

    If your question has been answered please mark your thread as "Solved" so that members will know by looking at the thread title that your problem is solved.

    Go to the menu immediately above your first post to the thread and click on Thread Tools. From the dropdown menu select "Mark this thread as solved..."

    If a member helped you solve your problem, consider adding to their reputation by clicking on the star icon below their name.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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. [SOLVED] vlookup to index/match or match/offset
    By scottiex in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-15-2015, 01:24 AM
  2. INDEX MATCH MATCH/OFFSET MATCH MATCH with named ranges
    By Andrew-Mark in forum Excel General
    Replies: 3
    Last Post: 02-27-2015, 10:56 PM
  3. Simple Match and Offset, but Match not working
    By JasonTheLucky in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-21-2014, 11:44 PM
  4. Replies: 1
    Last Post: 10-06-2014, 02:13 PM
  5. [SOLVED] Dynamic Name Range using Offset&Match with Match based off a different column
    By mdlpjr in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-16-2013, 06:33 PM
  6. [SOLVED] index match with row information offset from the match cell
    By smls in forum Excel General
    Replies: 7
    Last Post: 08-30-2012, 09:48 AM
  7. Replies: 2
    Last Post: 03-16-2012, 12:03 PM

Tags for this Thread

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