+ Reply to Thread
Results 1 to 4 of 4

Pivot Charts - Having trouble splitting up words in cells to make pivot charts

  1. #1
    Registered User
    Join Date
    12-16-2013
    Location
    Tokyo
    MS-Off Ver
    Excel 2007
    Posts
    42

    Pivot Charts - Having trouble splitting up words in cells to make pivot charts

    Hi guys,

    I have a bit of a Dilemna,

    We use a program at work to record what tasks we do and for each task we tag it with labels. For example if you visit the supermarket you can tag it with labels like "SHOPPING, FOOD, SUPERMARKET, MILK, BREAD" etc.

    This program spits out into excel all the tags/labels all into one cell with just a comma to seperate each tag. I need to make pivot charts in order to show how many times each tag appears. e.g. a Chart may show 3 bars with the first being how many times the tag "SHOPPING" is used, second bar showing how many times the tag "SUPERMARKET" is used, the third bar being how many times "MILK" is used etc etc.

    CURRENT METHOD (Have attached a workbook showing current method in a sheet)

    I currently painstakingly manually break up each cell full of tags and spread them out into other columns e.g. there is a "SHOPPING" Column so I cut and paste the word into this column in the same row. It is really inefficient and I'm praying for an easier way of doing this.

    DESIRED OUTCOME (have attached a workbook with a "desired outcome" sheet)

    Just hoping to be able to count all the tags in a pivot chart to compare how many tasks had to do with certain tags etc. I have made a pivot table as an example in the attached workbook.

    thanks in advance Excel geniuses! I hope I dont have to manually break up these tags which is really depressing
    Attached Files Attached Files
    Last edited by wcngu1; 03-30-2016 at 01:01 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    01-03-2016
    Location
    Conwy, Wales
    MS-Off Ver
    2016
    Posts
    974

    Re: Pivot Charts - Having trouble splitting up words in cells to make pivot charts

    See if this gets you close to what you are looking for. Open the attatched file, Enable macros, make your selection of values for column A in sheet "Tags Problem"
    Run the macro with {ctrl} + t
    You do not need the final table in sheet 2 to create your pivot table - but it shows what the values should be.

    What the macro does:
    -Clears old values in sheets 1&2
    -Copies selected values to sheet1
    -Creates an array of all tags in column B
    -Copies those values to sheet2 and removes duplicates to create unique list
    -Places unique list as column headers in Sheet1
    -Searches for matches to the values in those column headers against columnB
    -Places matched values in relevant column
    -Places count of each tag in sheet2
    (Uses CountIf to arrive at count for each tag -matching sheet1 values and unique values in sheet2)



    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    12-16-2013
    Location
    Tokyo
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: Pivot Charts - Having trouble splitting up words in cells to make pivot charts

    Hi Kevin! thanks for your complex solution! It works a treat and was amazed you figured how to do that. I didnt realise this problem required a VBA solution O_O

    I will attempt to implement this into my master list and will let you know how I go when i finally get more time to work on it!

    Cheers have a great weekend Kevin

  4. #4
    Valued Forum Contributor
    Join Date
    01-03-2016
    Location
    Conwy, Wales
    MS-Off Ver
    2016
    Posts
    974

    Re: Pivot Charts - Having trouble splitting up words in cells to make pivot charts

    A formula solution:

    Put this in cell C2 and copy down and across
    =IF(ISNUMBER(SEARCH(C$1,$B2)), C$1, "")
    For this to work you need all the headings in row1
    see sheet formula solution

    The vba solution does everything including building an index of unique Headings automatically, and results in everything being included when a new tag is added.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Help me make this data look better /charts/pivot
    By horsefish01 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 10-21-2015, 03:01 AM
  2. Make pivot charts bitmap and replace original
    By thedon_1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-23-2013, 06:18 AM
  3. Power Pivot with multiple pivot charts using different pivot data
    By Paul-NYS in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-10-2013, 10:18 AM
  4. Replies: 8
    Last Post: 08-08-2012, 05:44 PM
  5. Creating simple charts from multiple pivot table charts
    By hovaucf in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-23-2008, 04:13 PM
  6. make existing pivot charts point at the same database
    By Valeria in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 06-15-2005, 08:05 AM
  7. Replies: 0
    Last Post: 01-19-2005, 06:34 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1