Forum Discussion
Krishnan1989
Mar 28, 2023Copper Contributor
Hot to capture Slicer selected value from formula?
Hi Riny_van_Eekelen/ Lorenzo , I'm using Slicer with non-pivot table. I need to show my slicer selected item/items on another cell. Please provide me any workaround/solution for my problem. Than...
Rodrigo_
Mar 28, 2023Steel Contributor
Thank you for providing the sample spreadsheet. Based on your sample data, here's a formula you can use in cell B2 to display the selected items from the slicer:
=TEXTJOIN(", ",TRUE,IF($A$2:$A$11=FILTERS!$B$3,$B$2:$B$11,""))
Make sure to enter this formula as an array formula by pressing Ctrl + Shift + Enter after typing it, instead of just Enter. Then, copy the formula down to all rows in your table.
Here's how the formula works:
- FILTERS!$B$3 refers to the cell that contains the selected value in your slicer.
- $A$2:$A$11=FILTERS!$B$3 compares each value in the range A2:A11 with the selected value in the slicer. This will result in an array of TRUE and FALSE values.
- IF($A$2:$A$11=FILTERS!$B$3,$B$2:$B$11,"") returns the corresponding value in column B if the value in column A matches the selected value in the slicer, or an empty string otherwise.
- TEXTJOIN(", ",TRUE,IF($A$2:$A$11=FILTERS!$B$3,$B$2:$B$11,"")) concatenates all non-empty values in the resulting array, separated by a comma and space. The TRUE argument in the TEXTJOIN function tells Excel to ignore empty cells.
I hope this helps! Let me know if you have any further questions.
Krishnan1989
Mar 28, 2023Copper Contributor
Hi Rodrigo_ ,1st of all thank you for the reply and I'm using excel 2016 so I can't use the FILTER and UNIQUE function.
- Rodrigo_Mar 28, 2023Steel Contributor
Krishnan1989
I'm having out of options if you don't use Filter Function.
I suggest that you download an Filter function Add-In.
Here's the link: Filter Function Add-In