+ Reply to Thread
Results 1 to 7 of 7

Listing many unique values based on an if statement

  1. #1
    Registered User
    Join Date
    12-21-2011
    Location
    Ontario
    MS-Off Ver
    Excel 2010
    Posts
    9

    Listing many unique values based on an if statement

    Ok, I am not sure how best to describe this, so I have attached an example excel file with a sample of what I am trying to do.

    My file has a sheet with raw data collected during surveys at various businesses, the sheet is called RawData in this case. The OutputReport is a speadsheet which we are using to create reports for each inividual business where the surveys were done based only on the surveys from their store (the surveys were entered all in one sheet since we also want to be able to create overall reports for the whole commercial district).

    My question is if there is a way to list, without repetition, the reasons that people listed for visiting the store "World's Away". I tried using an IF statement in an array, however it only finds the reason the first person listed, and I can't get it to show any of the other participants' reasons, or the reasons for any of the other stores.

    My desired results for the OutputReport would look something like:

    Why choose this business?
    Convenient and store owner rocks!
    Regular business/purchases/second home
    Product/price
    One of my favourite stores


    Thank you,
    Michael
    Attached Files Attached Files
    Last edited by MCoev; 12-22-2011 at 03:30 PM.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Listing many unique values based on an if statement

    MCoev,

    Welcome to the forum!

    Attached is a modified version of your example workbook. I created a data validation list for the business names in cell B13 of the OutputReport sheet. Then in cell B15 is this formula:
    Please Login or Register  to view this content.

    It is copied down for 15 rows. Just choose the business name in B13 and the formula will do the rest. Is something like that what you were looking for?
    Attached Files Attached Files
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: Listing many unique values based on an if statement

    Hello,

    THis is a great pivot table application. If I were you, would create a named range (in the attached example go to formula tab > name manager to see where you define them).

    I made the range, RawDataTable defined by =RawData!$A$1:INDEX(RawData!$1:$1048576,COUNTA(RawData!$A:$A),3)

    Then, i inserted a pivot table which referenced it (see what that looks like in Output REport tab of the attachment.

    Attached Files Attached Files
    Remember, saying thanks only takes a second or two. Click the star icon(*) below the post you liked, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.

  4. #4
    Registered User
    Join Date
    12-21-2011
    Location
    Ontario
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Listing many unique values based on an if statement

    Thank you very much for the fast replies! I am not sure which I will use yet, but they both do exactly what I wanted!

    Thanks again!

  5. #5
    Registered User
    Join Date
    12-21-2011
    Location
    Ontario
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Listing many unique values based on an if statement

    I have a follow up question!

    I ended up using the Pivot Table since it lets me count as well as select different values to display or hide. For one of the questions I asked people to list other businesses they were visiting, so account for people listing more than one other business I had four columns (fields) to enter other businesses in. Is there a way to list the values on those four columns as just one field in a pivot table?
    Last edited by MCoev; 12-22-2011 at 03:18 PM.

  6. #6
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: Listing many unique values based on an if statement

    yes, can you upload an example again? can try to make it happen for you.

  7. #7
    Registered User
    Join Date
    12-21-2011
    Location
    Ontario
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Listing many unique values based on an if statement

    Sorry about the delay, I was off for a bit on Christmas holidays! Back now though!

    I would like a pivot table, sorted by Store name in column B (only showing values for "World's Away"), with all the values under the columns "Other Stores1", "Other Stores2", "Other Stores3" to be listed as one field. (By that I mean Store2 is not a subsidiary of Store1, the values in all three columns are all to be counted equally). I would like to be able to count the number of responses in total across the three rows. Any suggestions no how to do this?

    Any help would be greatly appreciated, thank you!

    Result I am looking for would be something like:

    World's Away

    Other Stores Visited:
    Coffee Shop 3
    Book Shop 2
    Restaurant 2
    Used Furniture Store 1
    Other Comic Book Stores 1
    Attached Files Attached Files

+ 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