+ Reply to Thread
Results 1 to 3 of 3

Grouping data for selected values

  1. #1
    Registered User
    Join Date
    08-04-2008
    Location
    Tallinn
    Posts
    8

    Grouping data for selected values

    I need an advice on how group data. The best way to explain this is to make an example:
    On one sheet i have two columns with following data:
    A B
    1st China
    1st Japan
    2nd China
    2nd Japan
    2nd Singapore

    I need to group data on second sheet followingly by using a formula:
    A B
    1st China; Japan
    2nd China; Japan; Singapore

    If i use VLOOKUP i only get the first value of column B on the first sheet and not the others. So all i could think of was a complicated IF formula but i have too much data for that and i even don't want to start writing it.

    Any help is welcome.
    Thankyou!

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Grouping data for selected values

    Hi iraisenot

    Try the attached in a Pivot Table format.

    Also there is a helper colum that would be the next step in getting closer to what you are really asking. This next step gives some bigger formulas but a Pivot Table takes none.

    hope this helps.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    08-04-2008
    Location
    Tallinn
    Posts
    8

    Re: Grouping data for selected values

    I really didn't understand the Pivot table, but thanks to your helper column i used a complicated if formula: =IF(C42=1;B42;IF(C42=2;B41&"; "&B42;IF(C42=3;B40&"; "&B41&"; "&B42;IF(C42=4;B39&"; "&B40&"; "&B41&"; "&B42;IF(C42=5;B38&"; "&B39&"; "&B40&"; "&B41&"; "&B42;IF(C42=6;B37&"; "&B38&"; "&B39&"; "&B40&"; "&B41&"; "&B42;IF(C42=7;B36&"; "&B37&"; "&B38&"; "&B39&"; "&B40&"; "&B41&"; "&B42;IF(C42=8;B35&"; "&B36&"; "&B37&"; "&B38&"; "&B39&"; "&B40&"; "&B41&"; "&B42;IF(C42=9;B34&"; "&B35&"; "&B36&"; "&B37&"; "&B38&"; "&B39&"; "&B40&"; "&B41&"; "&B42;IF(C42=10;B33&"; "&B34&"; "&B35&"; "&B36&"; "&B37&"; "&B38&"; "&B39&"; "&B40&"; "&B41&"; "&B42;IF(C42=11;B32&"; "&B33&"; "&B34&"; "&B35&"; "&B36&"; "&B37&"; "&B38&"; "&B39&"; "&B40&"; "&B41&"; "&B42))))))))))

    Thank you for your help!

+ 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