+ Reply to Thread
Results 1 to 11 of 11

Matrix: Identify cell content in column for a row if matrix content true

  1. #1
    Registered User
    Join Date
    03-21-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    6

    Smile Matrix: Identify cell content in column for a row if matrix content true

    Hi,

    Just edited slightly from earlier post.

    For a table like the one below produced for the sake of example (actual is much much bigger) I want to make it list rows that are true for a certain column for a certain variable in the matrix. So for say water terrain, which types of activity can I do i.e. swimming. Or for Offroad the activites which I can't do i.e. Run and Swim.


    Activity Water Road Offroad
    Jog n y m
    Run n y n
    Walk n y y
    Swim y n n

    y=yes
    n=no
    m=maybe

    Can this be done? Appeciate your help.

    Many thanks,

    T
    Last edited by deuy2014; 03-21-2014 at 11:32 AM.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Matrix: Identify cell content in column for a row if matrix content true

    If you want results in a single cell, would have to use VBA, otherwise could be done with formulae or VBA.

    Perhaps you can post a workbook with a small representative sample of data?
    Last edited by StephenR; 03-21-2014 at 12:00 PM.

  3. #3
    Registered User
    Join Date
    03-21-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Matrix: Identify cell content in column for a row if matrix content true

    Example 1.xlsx

    Hi,

    Thanks for your comment. I have attached an excel example identifcal to the one I tried to insert via text.

    T

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Matrix: Identify cell content in column for a row if matrix content true

    OK, but you haven't indicated what result you are expecting.

  5. #5
    Registered User
    Join Date
    03-21-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Matrix: Identify cell content in column for a row if matrix content true

    I basically want to know which activity types correspond to a certain terrain that are a yes.
    So the result would be a list.
    There are two variable and a set of results, the row cell which could be 'offroad' for example, and the matrix content which could be n (no) for example. So the result would be 'run and swim'.

    Does that make sense?

    Many thanks,

    T

  6. #6
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Matrix: Identify cell content in column for a row if matrix content true

    But can you address the question in post 2?

    A formula: If "Road" is in G1 and "y" in H1 then this in F4 and copy down as far as necessary.

    =IF(ROWS(F$4:F4)<=COUNTIF(OFFSET($B$3,1,MATCH($G$1,$C$3:$E$3,0),4,1),$H$1),INDEX($B$4:$B$7,SMALL(IF(OFFSET($B$3,1,MATCH($G$1,$C$3:$E$3,0),4,1)=$H$1,ROW($B$4:$B$7)-ROW($B$4)+1),ROWS(F$4:F4)),1),"")

    Enter with Ctrl+Shift+Enter.

  7. #7
    Registered User
    Join Date
    03-21-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Matrix: Identify cell content in column for a row if matrix content true

    Thanks a lot however I can't seem to get your forumula to work. I used the example I attached and placed the 'road' and 'y' in the noted places. Pressing Ctrl+Shift+Enter didn't seem to do anything.

    I thought I answered your question in my last post but perhaps I misunderstand, could you re-explain what you meant?

    Many thanks,

    T

  8. #8
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Matrix: Identify cell content in column for a row if matrix content true

    @deuy2014
    Your sample is lack of desired output. Try to type few rows manually with expected results.
    Quang PT

  9. #9
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Matrix: Identify cell content in column for a row if matrix content true

    Example 1.xlsm

    Works for me. See attached. Note that in your file you had leading and trailing spaces.
    Last edited by StephenR; 03-21-2014 at 01:52 PM.

  10. #10
    Registered User
    Join Date
    03-21-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Matrix: Identify cell content in column for a row if matrix content true

    Ok thanks fo sending the example sheet, helped a lot. I didn't realise you had to select the forumla as opposed to the cell when doing Enter with Ctrl+Shift+Enter.

    Works perfectly and was exactly what I was after.

    Thanks a lot,

    T

  11. #11
    Registered User
    Join Date
    06-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Matrix: Identify cell content in column for a row if matrix content true

    I had a question but I think I figured it out. Not sure how to delete the post yet.
    Last edited by Learn234; 03-27-2014 at 06:10 PM.

+ 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: 2
    Last Post: 02-11-2014, 05:05 AM
  2. Change content in cell B1 pending on True or False in C3
    By Rocky2013 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-28-2013, 07:32 PM
  3. [SOLVED] How to autofill a column with a cell content depending on content in another cell.
    By lul1971 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-17-2012, 12:33 PM
  4. using cell content to identify range + array?
    By fern in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-16-2007, 07:12 PM
  5. [SOLVED] How to identify entries in a matrix also present in another list
    By larkindale in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-16-2005, 03:05 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