+ Reply to Thread
Results 1 to 4 of 4

Using an array to create a list of selected items

  1. #1
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    Using an array to create a list of selected items

    Hi,

    I've created a range B3:B12 in which each cell returns TRUE of FALSE. There corresponding values are listed in C3:C12. I have the same thing again in D3:D12 and E3:E12.
    Checkboxes link to the TRUE/FALSE cells. Attached is a stripped down file to show this.

    I want to create a formula that lists each item in the one cell (no spaces required inbetween) for use with a search. I know a long winded way to do this involving many IFs but any array will be much more tidier, thing is I hardly use arrays and have struggled with this one.

    I'm thinking it will be along the lines of =IF(B3:B12="TRUE",C3:C12,"")&IF(D3:D12="TRUE",E3:E12,"") but exactly what it should be is beyond me.

    As always your help is much appriciated.

    EDIT: The original file attached was corrupt for some reason, the new attachedment is the same except instead of TRUE/FALSE cells I've set them to 'x' for quickness (lost my work...!).

    ItemsList.xlsx
    Last edited by Harribone; 03-02-2014 at 10:59 AM.
    Say thanks, click *

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Using an array to create a list of selected items

    Using the VBA function at this link:

    http://www.excelforum.com/showthread...=1#post3096647

    You can then enter this array formula** in G3:

    =concatall(IF(B3:B12="x",C3:C12,""))&concatall(IF(D3:D12="x",E3:E12,""))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    Re: Using an array to create a list of selected items

    Ah ha!

    Good stuff, thanks for the help! I really do need to get into VBA.



    I would add to your rep but the site won't let me (telling me to spread rep around to others first....)

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Using an array to create a list of selected items

    Quote Originally Posted by Harribone View Post
    Ah ha!

    Good stuff, thanks for the help! I really do need to get into VBA.
    You're welcome!

    I would add to your rep but the site won't let me (telling me to spread rep around to others first....)
    That happens when you try to rep someone twice in a row. I must have been the last person you repped!

+ 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: 1
    Last Post: 09-03-2012, 10:03 PM
  2. [SOLVED] Populating an array with selected ListBox items
    By wz4np1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-13-2012, 07:52 AM
  3. [SOLVED] Fill Array from Selected Items in Text Box
    By John Michl in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-05-2006, 09:15 AM
  4. ListBox Selected Items into an Array
    By jtp550 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-27-2005, 07:44 PM
  5. Replies: 1
    Last Post: 06-24-2005, 12:21 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