+ Reply to Thread
Results 1 to 6 of 6

Index & match overlapping data

  1. #1
    Forum Contributor
    Join Date
    03-05-2015
    Location
    norwich
    MS-Off Ver
    365
    Posts
    107

    Index & match overlapping data

    Hi experts

    I have a set of velocity speeds for soils and rocks and I'm using an index and match formula for these speeds for data I'm importing. The formula is

    =INDEX(H28:H45,SUMPRODUCT(--(I28:I45<=D7)*(J28:J45>=D7),ROW(I28:I45))-ROW(28:28)+1)

    The reference table H28-J45 is shown below:

    Soft CLAY 40 75
    Stiff CLAY 75 135
    Loose SAND 135 240
    Dense SAND & GRAVEL 240 355
    Residual Soil 355 600
    Metamorphic and Igneous rock
    RQDa 0 500
    RQDb 600 760
    RQDc 760 1500
    RQDd 1500 2500
    RQDe 2500 3400
    Basement 3400 3600
    Porous & saturated sandstone 800 1800
    Limestone 2000 3300
    Chalk 1100 1300
    Granite 2500 3300
    Basalt 2800 3400
    Gneiss 2700 3200

    The formula works....unless there are overlapping velocities. i.e if I'm returning a speed of 2900 the index & matched rock type could be Limestone, Granite, Basalt and Gneiss resulting in me returning an error. Is it possible for excel to somehow Concatenate these returned values into 1 cell or am I stuck with only being able to return one result?

    Thank you for your time!

  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,929

    Re: Index & match overlapping data

    You are not actually using MATCH(), you are using SP, but thats not really the point here.

    INDEX (like vlookup) generally returns the 1st match it finds, then stops looking. I think, for what you want, you need to use something like index/small/if and then concat them

    If you still have a problem, upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    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
    Forum Contributor
    Join Date
    03-05-2015
    Location
    norwich
    MS-Off Ver
    365
    Posts
    107

    Re: Index & match overlapping data

    Hey,

    Thank you for your reply. I've attached a sample workbook. I'm still having trouble - it took me about an hour to work out the index andsumproduct formula!
    Attached Files Attached Files

  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,929

    Re: Index & match overlapping data

    I got it using a helper (D), with this copied down...
    =IF(AND($B$9>=B2,$B$9<=C2),A2,"")

    Then B9=SUBSTITUTE(TRIM(D2&" "&D3&" "&D4&" "&D5&" "&D6&" "&D7)," ",",")

  5. #5
    Forum Contributor
    Join Date
    03-05-2015
    Location
    norwich
    MS-Off Ver
    365
    Posts
    107

    Re: Index & match overlapping data

    Cheers for the help, I ended up going with your small method

    {=INDEX($N$14:$P$37,SMALL(IF(($O$14:$O$37<=$D$7)*($P$14:$P$37>=$D$7),ROW($O$14:$O$37)-13),ROW(C1)),1)}

    D refers to the velocity
    N,O and P refer to rock type, lower velocity & higher velocity respectively

    Cheers!

  6. #6
    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,929

    Re: Index & match overlapping data

    good stuff, thanks for the feedback

+ 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] Match Issue - Consolidate Columns of Data With Match/Index/etc?
    By excelsior123 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-03-2014, 05:14 PM
  2. Replies: 6
    Last Post: 04-30-2014, 02:42 AM
  3. Replies: 6
    Last Post: 11-08-2013, 10:29 PM
  4. Replies: 3
    Last Post: 05-08-2013, 02:10 PM
  5. Replies: 3
    Last Post: 05-02-2013, 01:31 AM

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