+ Reply to Thread
Results 1 to 10 of 10

Index/Match - Generating a reference results list from conflated cell values

  1. #1
    Registered User
    Join Date
    03-08-2017
    Location
    Earth
    MS-Off Ver
    Mac MS Office 2011
    Posts
    6

    Index/Match - Generating a reference results list from conflated cell values

    Hello guys,

    Here is the .xls file.

    Essentially, I'd like to create a formula across each column (such as column B in my example) that looks at the cell values, calculates whether the *second value* after the hyphen is *lower* than the value before the hyphen, then takes column A's value equivalent and prints all the values into an array in a cell below the column.

    For example:

    A B
    1 2-2
    2 1-3
    3 4-1
    4 3-4
    5 1-2
    Result 2,4,5


    Hope that helps, sorry if my title was confusing.

    Cheers

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

    Re: Index/Match - Generating a reference results list from conflated cell values

    Hi, welcome to the forum

    1st, it is almost always better if you upload a sample workbook to the forum, not all members are willing - or able - to access google docs
    2nd, if you have data (values) in a cell like that, separated by - then those numbers become text, not numeric, and you cannot easily run calcs on text
    3rd are the "numbers" always just 1 digit?
    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
    03-08-2017
    Location
    Earth
    MS-Off Ver
    Mac MS Office 2011
    Posts
    6
    Quote Originally Posted by FDibbins View Post
    Hi, welcome to the forum

    1st, it is almost always better if you upload a sample workbook to the forum, not all members are willing - or able - to access google docs
    2nd, if you have data (values) in a cell like that, separated by - then those numbers become text, not numeric, and you cannot easily run calcs on text
    3rd are the "numbers" always just 1 digit?
    Thank you!

    1. I'll keep that in mind thanks, just a direct upload as an attachment to my post?
    2. Is there a way I can run a calculation on the text and turn that hyphen into a minus, so that any negative value gives me the cells I'm looking for?
    3. Yes, they will always be single digits separated by a hyphen

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

    Re: Index/Match - Generating a reference results list from conflated cell values

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.

  5. #5
    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,939

    Re: Index/Match - Generating a reference results list from conflated cell values

    If you have something like this...
    B
    C
    2
    3
    3–3
    0
    4
    0–1
    -1
    5
    3–1
    2
    6
    7
    2–1
    1
    8
    1–4
    -3
    9
    0–0
    0
    10
    3–1
    2

    Then you could use thiis...
    C2=IFERROR(LEFT(B2,1)-RIGHT(B2,1),"")
    copied down

  6. #6
    Registered User
    Join Date
    03-08-2017
    Location
    Earth
    MS-Off Ver
    Mac MS Office 2011
    Posts
    6

    Re: Index/Match - Generating a reference results list from conflated cell values

    You're great, worked perfect!

    Last question - now that I have my results (a series of integers, some positive/negative, some zeros...)

    How do I find all the negative numbers along a single column, refer to column A, pull the resultant value, and print all matching criteria into a single cell?

    I've attached an example workbook with a typed out result of what I'd like to achieve through a function
    Attached Files Attached Files

  7. #7
    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,939

    Re: Index/Match - Generating a reference results list from conflated cell values

    Try this...
    B23=IFERROR(IF(LEFT(B2,1)-RIGHT(B2,1)<0,$A23,""),"")
    copied down and across
    This will give you the row numbers straight off

    Then use this to combine them...
    =SUBSTITUTE(TRIM(B23&" "&B24&" "&B25&" "&B26&" "&B27&" "&B28&" "&B29&" "&B30&" "&B31&" "&B32&" "&B33&" "&B34&" "&B35&" "&B36&" "&B37&" "&B38&" "&B39&" "&B40&" "&B41&" "&B42)," ",",")

    It's a bit messy, but it works

  8. #8
    Registered User
    Join Date
    03-08-2017
    Location
    Earth
    MS-Off Ver
    Mac MS Office 2011
    Posts
    6

    Re: Index/Match - Generating a reference results list from conflated cell values

    Quote Originally Posted by FDibbins View Post
    Try this...
    B23=IFERROR(IF(LEFT(B2,1)-RIGHT(B2,1)<0,$A23,""),"")
    copied down and across
    This will give you the row numbers straight off

    Then use this to combine them...
    =SUBSTITUTE(TRIM(B23&" "&B24&" "&B25&" "&B26&" "&B27&" "&B28&" "&B29&" "&B30&" "&B31&" "&B32&" "&B33&" "&B34&" "&B35&" "&B36&" "&B37&" "&B38&" "&B39&" "&B40&" "&B41&" "&B42)," ",",")

    It's a bit messy, but it works
    Sorry to bring this up again, but I've hit a wall and I've asked everywhere and everyone I can think of - I just can't figure it out.

    After creating the substitute formula you helped with, I then wanted to combine two cells at a time. In the attached file, I'd like to combine B44 + W44 into B45 (while removing duplicates). Then, C44 + X44 into B46, and so on and so forth. I tried codes from here and here to no avail. The second link worked with a cell range (i.e. B44:W44), however I only need two cells rather than all between.

    Much appreciated!
    Attached Files Attached Files

  9. #9
    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,939

    Re: Index/Match - Generating a reference results list from conflated cell values

    If you want to combine H/A and A/H, would having the answers all in 1 table (24:43) be acceptable, instead of "2" tables, 1 for H/A and 1 for A/H? If some then change the formula in B24 to this...
    =IF(OR(IFERROR(LEFT(B3,1)-RIGHT(B3,1),0)>0,IFERROR(LEFT(W3,1)-RIGHT(W3,1),0)<0),$A24,"")
    the summary at the bottom will then pull out the answers you want.

    If you still need to show the 2 tables in 24:43, then add another helper table below, and use that same approach, you will just need to adjust the references in the summary formula

  10. #10
    Registered User
    Join Date
    03-08-2017
    Location
    Earth
    MS-Off Ver
    Mac MS Office 2011
    Posts
    6

    Re: Index/Match - Generating a reference results list from conflated cell values

    Quote Originally Posted by FDibbins View Post
    If you want to combine H/A and A/H, would having the answers all in 1 table (24:43) be acceptable, instead of "2" tables, 1 for H/A and 1 for A/H? If some then change the formula in B24 to this...
    =IF(OR(IFERROR(LEFT(B3,1)-RIGHT(B3,1),0)>0,IFERROR(LEFT(W3,1)-RIGHT(W3,1),0)<0),$A24,"")
    the summary at the bottom will then pull out the answers you want.

    If you still need to show the 2 tables in 24:43, then add another helper table below, and use that same approach, you will just need to adjust the references in the summary formula
    You're amazing - maybe a dozen people gave their opinions and this was the most efficient one, cheers.

+ 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. Replies: 5
    Last Post: 02-18-2017, 11:21 AM
  2. [SOLVED] Index / Match - match 3 input values and return the results from the index
    By t83357 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-08-2016, 07:34 PM
  3. Index/Match with Multiple Results in One Cell
    By curtjer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-10-2014, 07:36 PM
  4. Replies: 10
    Last Post: 05-22-2014, 06:44 AM
  5. Replies: 3
    Last Post: 05-19-2014, 02:01 PM
  6. Replies: 4
    Last Post: 01-13-2014, 04:16 AM
  7. How to INDEX/MATCH values from SharePoint List based on excel cell value?
    By Rerock in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-04-2012, 12:37 AM

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