Forum Discussion

Thomas Clark's avatar
Thomas Clark
Copper Contributor
Mar 23, 2018

Pulling certain data in a pivot table

Want to create a pivot table that provides the count of data when a cell contains A, B, or A and B. 

**note - the cells being referenced have multiple values in each

(example : Display info below in pivot. Pivot will display count of all cells in Column A that contain the numbers 1, 2, or 1 and 2)

  A
1 codes
2 1, 4, 7
3 2, 9, 0
4 1, 2, 3
5 8, 3, 4, 6, 7
6 0, 5

1 Reply

  • JKPieterse's avatar
    JKPieterse
    Silver Contributor
    This is one way to approach this (assuming the numbers are less than 10!):

    =IFERROR(CHOOSE(OR(NOT(ISERROR(FIND("1,",A2))),NOT(ISERROR(SEARCH(" 1",A2))))+2*OR(NOT(ISERROR(FIND("2,",A2))),NOT(ISERROR(SEARCH(" 2",A2)))),"1","2","1 and 2"),"None")

Resources