1

i have a table with a column NeedSegment containing cells with values like the followings:

  • OEMrs;#Partners;#Balancers;#DoItYourselfers;#Savers
  • OEMrs;#Partners;#Balancers
  • Savers

A different column is named Portfolio and contains normal single values.

In the end I would like to have a chart which displays per Portfolio how many rows have a specific needsegment e.g. Partners.

I've tried already with consolidated multiple pivot tables (Label contains) or countifs. But it seems to me far too complex...

Any advice or is additional information needed?

Werner
  • 6,125
  • 4
  • 17
  • 11

1 Answers1

2

I can't see an easy way to deal with this without splitting first the data with the ; semicolon separator.

First of all, split your data:

  1. Highlight all of your cells with the data:
    1. Select the topmost cell in the column, e.g. A1
    2. Hold CTRL+SHIFT and then press the down arrow.
  2. OK, once we've done that, go to "Data" menu and select "Text to Columns".
  3. On the Text to Columns window, select "Delimited" and then click "Next".
  4. In the following window, choose both "Semicolon" and "Other" under Delimiters, and type # in the box next to "Other".
  5. Check the box labeled "Treat consecutive delimiters as one".
  6. Click Finish.

Source

Note: you could also do this with formula (but that would be a pain in the ass, except if you already know how many values there can be surrounding the semicolon)
Note2: you could also do this with VBA if you needed to repeat it several times

Secondly, you can build a Pivot Graph as described in ozgrid

[EDIT] Another solution - with formulas

What you can do if you only want to count the number of NeedSegments per value is to use this formula :

=SUMPRODUCT(IF(FIND("#Partners",A2:A20)>0,1,0))

You can refer to another cell to get the result for each NeedSegment:

=SUMPRODUCT(IF(FIND(B1,$A$2:$A$20)>0,1,0))
Dan Henderson
  • 523
  • 7
  • 10
JMax
  • 26,109
  • 12
  • 69
  • 88
  • Many thanks for this input, please take into account my solution described below. – Werner Sep 08 '11 at 14:01
  • @Werner: i didn't see much change in your question. I edited my answer to show you another solution – JMax Sep 08 '11 at 14:32
  • I'm not able to post an answer to my own question in the first 8 hours, therefore: I've added new columns for each needsegment: =IF(FIND("OEMrs";Table_owssvr_2[[#This Row];[Need Segments]])>0;TRUE;FALSE) Then i've created a new table with countifs: =COUNTIFS('owssvr(2)'!$B:$B;$A2;'owssvr(2)'!AB:AB;TRUE) Seems to me the most simple implementation... – Werner Sep 08 '11 at 15:10