![]() |
|
|
|
#1
|
|||
|
|||
|
I have a spreadsheet with a large list of medications and the areas where they are kept. Each row shows a different area.
I want to remove all the duplicate values for the medications, but have all the areas combined into 1 cell separated by commas. It might be a lot to ask, but can anyone help with the best way to do this It will make the list a lot shorter (which I need), but will have all the locations together I have attached an example of what I am after |
|
#2
|
|||
|
|||
|
It's possible, but do you really want to do this in such a way?
To do this you need a helper column in your original table, which calculates for every row the occurrence number (1, 2, 3, ... etc.) for current medication there. And then in other table you need a formula which reads the max occurrence number for particular medication, and concatenates x times the area of every occurrence of it in case this occurrence number is less or equal of max occurrence for this medication, or adds an empty string in case in case this occurrence number is greater of max occurrence for this medication. And the number of concatenations must be egual with greatest max occurrence number in whole table (i.e. x I used above) . The formula will grow huge very fast when at least one of medications may be present in many areas. Why do you not simply: use autofilter on your original table to get all locations of specific medication; or order your table by medications, so all locations for every medication are grouped together. (And order them by locations in case you need all medications in every location to be grouped together) |
|
#3
|
||||
|
||||
|
Use Power Pivot and create a measure as shown in the attached file. Then look at this link for a tutorial on how this was created.
Excel: Reporting Text in a Pivot Table | IMA
__________________
Alan עַם יִשְׂרָאֵל חַ Using O365 v2511 |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Combine "sort within groups" and "identify duplicate/unique values" in two different variables. | civilcervant | Excel | 3 | 06-12-2017 07:27 AM |
Combine documents makes duplicate word
|
vincelge | Word | 2 | 05-15-2017 05:47 AM |
How to remove duplicate vlookup values
|
suniltko | Excel | 2 | 03-21-2017 10:52 AM |
Combine values from different worksheets into a single worksheet.
|
jimmy2016 | Excel | 2 | 10-06-2016 09:15 AM |
Compare & remove both sets of duplicate values
|
mummy | Excel | 1 | 03-28-2016 02:59 AM |