+ Reply to Thread
Results 1 to 9 of 9

Selection list to bring up cells

Hybrid View

Toddneyx Selection list to bring up... 06-06-2008, 04:31 AM
ratcat G'day Toddneyx, To make a... 06-06-2008, 09:38 AM
Leith Ross Hello Toddneyx, Welcome to... 06-06-2008, 09:50 AM
Toddneyx Hi guys, Thanks for the... 06-06-2008, 10:35 AM
ratcat G'day again, Try this ... 06-06-2008, 11:55 AM
Toddneyx Hi, Thanks alot for the... 06-07-2008, 09:00 AM
ratcat What you said sound about... 06-07-2008, 09:03 PM
  1. #1
    Registered User
    Join Date
    06-06-2008
    Posts
    34

    Selection list to bring up cells

    Hi,

    I have attached the test spreadsheet that my boss has sent me. Basically what he is trying to achieve is a report page, which when you use the drop-down list to select Customer Name + Customer Location (didn't know how to make both of them work), which would then return all of the data records that this customer has, taking from the data field.

    Eventually he will want a graph to be made from those results, but that is less of an issue.

    The issue is that I don't know how to make excel do this! In a database it would be so much simplier, but here I am completely stuck. Would appreciate any help you can give me.

    Thanks,
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor ratcat's Avatar
    Join Date
    03-07-2008
    Location
    Rural NSW, Australia
    MS-Off Ver
    Vista 2007
    Posts
    1,111
    G'day Toddneyx,

    To make a drop down list, click on the link

    http://www.contextures.com/xlDataVal01.html

    Then use a VLOOKUP formula to get the other information across.

    Hope that helps

    Cheers
    Attached Files Attached Files
    Have I made you happy ??? If yes, please make me happy by pressing the http://www.excelforum.com/images/buttons/reputation-40b.png Add Reputation button in my post.
    Please don't forget to do the same to other contributors of this forum.

    Thanks
    I don't void confusion, I create it

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Toddneyx,

    Welcome to the Forum!

    You can also do this manually using Auto Filter.

    1. Select the header row (row 2).
    2. Under Data on the menu select Filter, Auto filter. Drop downs will appear above each column.
    3. Click the drop down arrow over the column you want to sort the data by.
    4. Choose from the list the item to use as the data filter.
    5. Copy the filtered data (rows numbers will be in blue) using CTRL+C.
    6. Paste them onto the report sheet using CTRL+V.

    Sincerely,
    Leith Ross

  4. #4
    Registered User
    Join Date
    06-06-2008
    Posts
    34
    Hi guys,

    Thanks for the information. My boss had already used the AutoFilter function, but wondering if there was something more straight forward for him.

    Basically he wants to select the customer, and then below, all of the records under than customer should appear. I tried doing the vlookup myself and though this does give me part of the solution, I was wondering if there was anyway to fetch ALL of the records for that customer? Like in a database I could do this relatively simply with a query.

  5. #5
    Valued Forum Contributor ratcat's Avatar
    Join Date
    03-07-2008
    Location
    Rural NSW, Australia
    MS-Off Ver
    Vista 2007
    Posts
    1,111
    G'day again,

    Try this

    The example attached is a array with column headers.

    There is a drop box with customers names. Select the a name then click out of the box then the information will appear against that name.

    Note: the formula is array. After editing the formula you must press Ctrl Shift Enter for the formula to work.

    Cheers
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    06-06-2008
    Posts
    34
    Hi,

    Thanks alot for the help, that is exactly what I wanted the formula to do. If you don't mind, would you be able to explain step for step what the formula does?

    =IF(ROW()-1>COUNTIF(Data!$B2:$B$1000,$B$2),"",INDEX(Data!$C$1:$C$1000,SMALL(IF(Data!$B$1:$B$1000=$B$2,ROW(Data!$B$1:$B$1000),""),ROW()-1)))

    From my understanding, it takes the current row number, and calculates if this is greater than the total number of times the CustomerName appears in the data set. If it is true then it returns nothing. But if it isn't, then it fetches the specified row (e.g. C1) from the data set. Is this correct?

    I have attached my modified version, just with some more fields and data to work with. I guess my main thing left to figure out, is how to filter these results even further. As you can see, a customer can have various different locations. My boss might want to focus in on just one customer account and just one of their locations. How would this be achieved?

    The customer number is unique for each customer location, an autonumber from the SAP database. Would it be possible to select the customer number, but cloak it as the Customer Name + Customer Location? Sort of like a combo box in a database I am thinking.

    Thanks again,
    Attached Files Attached Files

  7. #7
    Valued Forum Contributor ratcat's Avatar
    Join Date
    03-07-2008
    Location
    Rural NSW, Australia
    MS-Off Ver
    Vista 2007
    Posts
    1,111
    Quote Originally Posted by Toddneyx
    Hi,

    Thanks alot for the help, that is exactly what I wanted the formula to do. If you don't mind, would you be able to explain step for step what the formula does?

    =IF(ROW()-1>COUNTIF(Data!$B2:$B$1000,$B$2),"",INDEX(Data!$C$1:$C$1000,SMALL(IF(Data!$B$1:$B$1000=$B$2,ROW(Data!$B$1:$B$1000),""),ROW()-1)))

    From my understanding, it takes the current row number, and calculates if this is greater than the total number of times the CustomerName appears in the data set. If it is true then it returns nothing. But if it isn't, then it fetches the specified row (e.g. C1) from the data set. Is this correct?

    What you said sound about right. I've never really fully understand it, has yet. Full credit must go to martindwilson. Martin indirectly show me the formula in other thread. This as been a useful formula. Thanks Martin !!


    Quote Originally Posted by Toddneyx
    I have attached my modified version, just with some more fields and data to work with. I guess my main thing left to figure out, is how to filter these results even further. As you can see, a customer can have various different locations. My boss might want to focus in on just one customer account and just one of their locations. How would this be achieved?

    2 ways

    First
    . See "Form" sheet. Simple as you said "filter" option.

    Second
    . See "Ratcat Form" sheet. There is a dependent data validation at C2. There a hidden formula (A2) to help with location validation.

    On both sheet.
    I've also add a couple of formulas for the information at B2 & C2 to repeat itself down the list, when needed.

    Plus the formula array must be at the top of the sheet or data will go missing. Martin has named it, array with column headings.

    Eg Select a Cust name and a location (UK Ltd, Crawley) with a small amount of data retrieved. Then select row 1 and insert a new row and watch the data disappear depending on how many row you insert.


    Quote Originally Posted by Toddneyx
    The customer number is unique for each customer location, an autonumber from the SAP database. Would it be possible to select the customer number, but cloak it as the Customer Name + Customer Location? Sort of like a combo box in a database I am thinking.

    Thanks again,
    Am sorry I do not follow you here on what you would like to achieve.

    Is it that instead of making two selection (Cust Name & Location), you would like to make one selection. Also which information is displayed ?
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    06-06-2008
    Posts
    34
    Quote Originally Posted by ratcat
    See "Ratcat Form" sheet. There is a dependent data validation at C2. There a hidden formula (A2) to help with location validation.
    I do not understand this hidden formula.

    =VLOOKUP(B2,List!$F$2:$G$5,2,FALSE)

    It looks up the CustomerName (B2) but in F2:G5. I cannot understand how it knows which Customer Location to display from just that formula. Please can you explain as I have not managed to get this working on my real spreadsheet.

    Quote Originally Posted by ratcat
    Am sorry I do not follow you here on what you would like to achieve.

    Is it that instead of making two selection (Cust Name & Location), you would like to make one selection. Also which information is displayed ?
    That's right, so the end user would select from the drop-down list, Joe Bloggs Plc America, but this is actually selecting customernumber 0000170168 in the background. It would then display the information (all the columns as before) for just that customernumber.

+ 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. Average a selection of cells where some contain #DIV/0!
    By jfarlow in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-24-2008, 03:27 AM
  2. Populate list box from a range of cells?
    By samtwilliams in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 12-01-2007, 01:29 PM
  3. Block cells for selection
    By Pyrex238 in forum Excel General
    Replies: 1
    Last Post: 07-11-2007, 07:23 PM
  4. List with ability for user to add selection
    By ilotsmas in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-22-2007, 01:05 PM
  5. Validation List from 2 or more referenced cells
    By HuskerBronco in forum Excel General
    Replies: 4
    Last Post: 12-14-2006, 09:39 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