+ Reply to Thread
Results 1 to 6 of 6

Create a chart based on multiple values in one cell

  1. #1
    Registered User
    Join Date
    08-20-2014
    Location
    San Mateo, CA
    MS-Off Ver
    2010
    Posts
    86

    Create a chart based on multiple values in one cell

    Hello,

    Okay.. so I'm not sure if this is even possible, but I need to create a chart based on multiple values within a cell. I created a VB code that will enter multiple criteria into one cell, but now I need to be able to create a graph based on each independent value. For instance, if "apple" is selected and is included in a cell with "orange, grape, grapefruit" I need the chart to reflect the dollar amount for each independent fruit.

    Thanks so much!

    Create a chart based on multiple values in one cell.xlsx

  2. #2
    Forum Contributor
    Join Date
    10-13-2012
    Location
    Southern California
    MS-Off Ver
    Excel 2007
    Posts
    401

    Re: Create a chart based on multiple values in one cell

    It's certainly possible. You just need a subroutine to parse the contents of the cell, looking for any and all fruits. It helps that you have a comma after each fruit, since that could be the character the parser uses to recognize when a fruit ends and when the next one begins.

    However, I'm not sure I understand what you want the chart to look like. For example, your first line in the data file has four fruits and an amount of $7,657. How do you want this displayed on your chart? Likewise with the other lines. Are they all on the same chart or individual charts?

    A few chart examples of the end result would help.

  3. #3
    Registered User
    Join Date
    08-20-2014
    Location
    San Mateo, CA
    MS-Off Ver
    2010
    Posts
    86

    Re: Create a chart based on multiple values in one cell

    Hi Ed_Collins,

    I want the chart to sum the total of each fruit into a bar graph... I was thinking of creating a formula to search the content for "apple" for instance in column B. I could most likely get that to work.. but do you think there is a better way? Can you create a chart based on variables that have an amount greater than 0? I need to be able to automate the process and not redefine the parameters of the chart each time.

    graph: Bar chart
    X Axis: Independent Fruit (example: Apple only)
    Y Axis: The sum total based on column B which contains apple

    Thank you so much!

  4. #4
    Registered User
    Join Date
    08-20-2014
    Location
    San Mateo, CA
    MS-Off Ver
    2010
    Posts
    86

    Re: Create a chart based on multiple values in one cell

    awww... the source of the data with the formulas can be created as a table and then I can eliminate all variables that are zero Now I just need to figure out how to create the formula to properly sum the total.. right now, it's just finding the first value.

    =IF(ISNUMBER(SEARCH("Apple",B:B)),SUMIF(B:B,G5,A:A),NA)

  5. #5
    Registered User
    Join Date
    08-20-2014
    Location
    San Mateo, CA
    MS-Off Ver
    2010
    Posts
    86

    Re: Create a chart based on multiple values in one cell

    awww... figured this out:

    =SUMIF(B:B,"*Apple*",A:A)

    If I enter the * it will search for "apple" within the each of the cells... okay, lets see if this works.

  6. #6
    Registered User
    Join Date
    08-20-2014
    Location
    San Mateo, CA
    MS-Off Ver
    2010
    Posts
    86

    Re: Create a chart based on multiple values in one cell

    Okay.. so the formula above worked but when I create a table and uncheck 'zero' and then add a fruit with a value, the table does not automatically update. Any suggestions for how to automatically create a chart excluding variables that are zero?

+ 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. [SOLVED] Using VBA to create a table based on values on multiple worksheets
    By JoelG in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-07-2015, 08:58 AM
  2. Create new rows based on Multiple values in a column
    By bmj121 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-09-2015, 03:17 PM
  3. Create multiple bar types in one chart based on different data
    By SPRoyLLC in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-02-2014, 01:59 PM
  4. [SOLVED] Create multiple ranges based on an index of values that are also used as range names
    By Apog in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-05-2013, 12:48 PM
  5. (Likely VBA) - Need to create multiple values Based on One cell's value
    By nobody2000 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-29-2012, 12:41 PM
  6. Create a Pie Chart based on Date values entered.
    By avidcat in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 12-11-2009, 07:24 AM
  7. Create Chart with calculated cell values
    By JosephPraboi in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-30-2009, 09:49 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