+ Reply to Thread
Results 1 to 4 of 4

Check boxes or List boxes?

Hybrid View

NickH Check boxes or List boxes? 03-12-2008, 01:36 PM
Mark@Work There is probably a better... 03-12-2008, 02:30 PM
NickH Mark-Thanks for the reply. ... 03-13-2008, 10:31 AM
Mark@Work Sorry if I'm too late! 03-17-2008, 02:56 PM
  1. #1
    Registered User
    Join Date
    03-12-2008
    Posts
    2

    Check boxes or List boxes?

    I was hoping to get some help with my query. I have a list of companies in A1-A10 (sheet 1), what I was looking to do is either setup checkboxes for each company or a list box that contains all 10 companies.

    What I'm hoping to accomplish to to take the companies selected and put them on a second sheet.

    So Let's say:

    A1=Joe's Candy Shop
    A2=Mom's Candy Shop
    A3=Nick's Candy Shop
    A4=Harry's Candy Shop, etc.

    Now, I select Joe's Candy Shop and Harry's Candy Shop, I would like for them to appear on Sheet 2, in Column A. So A1 would equal Joe's Candy Shop and A2 would equal Harry's Candy Shop, order doesn't matter.

    I started using checkboxes and linking them to cells and then using the true/false in the linked cells to get what I needed, but I can't figure out how to accomplish this.

    Any help would be appreciated, thanks,

    Nick
    Last edited by VBA Noob; 03-12-2008 at 01:43 PM.

  2. #2
    Forum Contributor
    Join Date
    10-27-2006
    Location
    United Kingdom
    MS-Off Ver
    EXCEL 2003 (2007 at home)
    Posts
    517

    There is probably a better way...

    Someone will probably come up with a far better way that this, but I think it will work...

    Set up a column (in sheet1) that has ROW() if the relevant company is checked, or "" if it is not.
    Lets assume you use column X.
    Then (in sheet2) use SMALL(Sheet1!X:X,ROW()) to construct a column (lets use Y)
    containing only the NONBLANK values from Sheet1 column XX
    Then set:
    Sheet2!A1 to =INDEX(SHEET1!A:A,$Y1)
    Sheet2!A2 to =INDEX(SHEET1!A:A,$Y2)
    Sheet2!B1 to =INDEX(SHEET1!B:B,$Y1)
    etc...

    Mark.

  3. #3
    Registered User
    Join Date
    03-12-2008
    Posts
    2
    Mark-Thanks for the reply. Your response prompted another question. I have the check boxes on the sheet with the names associated with the check box. I don't have the names actually in A1-A10, but the check boxes are physically located in those cells. If I'm right, Excel doesn't actually put the check boxes in the cells they are on or near, but it's like they are on another layer on top of the spreadsheet

    I probably should re-phrase my question. Should I physicallly have the names in A1-A10 and a check box next to them in order for your formula to work?

    Thanks for being patient, I'm a newbie in terms of doing something like this.

    Nick

  4. #4
    Forum Contributor
    Join Date
    10-27-2006
    Location
    United Kingdom
    MS-Off Ver
    EXCEL 2003 (2007 at home)
    Posts
    517

    Sorry if I'm too late!

    Sorry I haven't replied earlier (buzy elsewhere)
    I didn't quite realize what you were trying to do with my earlier posts.
    I dont use the forms facilities much so I'm not realy familiar with them,
    but I think your last post more or less sums up the situation.
    I had a quick play with check boxes and they seem to just be a way of getting TRUE or FALSE into a chosen cell.
    The check box position is entirely unconnected with the cell it controls.
    The text displayed in the text box is not available for use in other cells.
    Thus to get the effect I think you want, set up a column with the company names (one to a row)
    Carefully position the check boxes alongside each name and use them to set the corresponding cell in the next column (to true of false)
    depending on the value of that cell you can set a third column to be ROW() or ""
    A bit scrappy, but about the best I can come up with.

+ 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