+ Reply to Thread
Results 1 to 9 of 9

Returning a set of instances (array formulas)

  1. #1
    Registered User
    Join Date
    02-04-2011
    Location
    boulder, co
    MS-Off Ver
    Excel 2003
    Posts
    74

    Question Returning a set of instances (array formulas)

    Hello,

    I have a large column of text, Column A. In B, I have a formula that returns a "1" whenever a certain text is found. There are 60 instances in column B where a 1 is displayed. So far so good. Now, I would like to display all of the cells in column A where a 1 was found in Column B.

    So, A has about 900 cells of text, B has 60 "1"s scattered about, and C should be filled with 60 cells based on where the "1"s where displayed.

    Sorry if that didn't come out too clear.
    Last edited by madadd; 02-18-2011 at 07:02 PM.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Returning a set of instances (array formulas)

    This regular formula will list the Col_A items, in the order encountered, where the corresponding Col_B value equals 1:
    Please Login or Register  to view this content.

    Copy that formula down as far as you need.

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    02-04-2011
    Location
    boulder, co
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: Returning a set of instances (array formulas)

    I'm getting a #value error

  4. #4
    Forum Contributor TechRetard's Avatar
    Join Date
    06-14-2009
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    202

    Re: Returning a set of instances (array formulas)

    you can't have any text in column B, not even a space -- for example if you have a formula that says [ if(celll=x,1,"") ] that "" would constitute a space
    Last edited by TechRetard; 02-18-2011 at 02:17 PM.

  5. #5
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Returning a set of instances (array formulas)

    If you post a workbook with representative data, we'll be able to see what you're working with.

  6. #6
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Returning a set of instances (array formulas)

    Another thought...(triggered by TR's comment):
    try this:
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    02-04-2011
    Location
    boulder, co
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: Returning a set of instances (array formulas)

    my formula for B is
    Please Login or Register  to view this content.
    And even when formatting B to numbers, still nada. Here's my sheet though.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    02-04-2011
    Location
    boulder, co
    MS-Off Ver
    Excel 2003
    Posts
    74

    Re: Returning a set of instances (array formulas)

    Ooo, that worked Ron, thank you. Any reason your previous one didn't work?

  9. #9
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Returning a set of instances (array formulas)

    Yes...In my scenario, Col_B contained 1's and 0's. Your scenario contained 1's and empty text (""). The empty text cannot convert to a number, hence the error.

    When I change the INDEX section of the SMALL function to use:
    Please Login or Register  to view this content.
    instead of:
    Please Login or Register  to view this content.

    The error was handled.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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