Sorry for the uninforming title.
My task is quite simple but I need this to be done in a macro (instead of filtering) and it has proven surprisingly difficult for me.
I have 3 columns (A,B,C) and an open-ended list of items (rows).
- A (category): gives the item's category (multiple items have the same category)
- B (value): item's value (text) which may not be unique among items
- C (selection): takes value TRUE or FALSE
I would need a macro that would report (separately for each category) the list of values taken by items that have been selected (i.e. for which column C equals TRUE). I would need the output to be a text string looking like this:
- Name of category 1: value1.1, value1.3, value1.5
- Name of category 2: value2.3
- Name of category 3: no item was selected for category 3
Here is a simplified example of my excel file Template.xlsx.
Many thanks!
PS: while the example has 3 different categories, this will vary in practice so the code should be robust to any number of categories ideally.
Bookmarks