+ Reply to Thread
Results 1 to 23 of 23

2-D Stacked bar chart

Hybrid View

  1. #1
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,369

    Re: 2-D Stacked bar chart

    Excel can do this. One possible way to automate the copying of the data in the top tables into the chart table might look like (starting from my file in post #8):

    1) In row 39, replace the 1st task, etc. with 1 in C39:I39, 2 in J39:P39, and so on.
    2) Replace Aduration, etc. in row 40 with simple A, B, C,...
    3) Build a formula in C41 that will a) test if the task in A3 matches the task in C40 then, b) if it matches, return the value from D3, else c) return 0. In a spreadsheet, this kind of decision is performed by an IF() function (https://support.microsoft.com/en-us/...c-aa8bbff73be2 ).
    3a) Use an INDEX() function (https://support.microsoft.com/en-us/...2-b56b061328bd ) to access the value in the first cell of A3:A7. INDEX($A$3:$A$7,C$39) [note the mix of relative and absolute references for easy copying]. Compare to the value in C40 -- INDEX(...)=C$40. Use that as the test condition in the IF() function =IF(INDEX(...)=C$40,...)
    3b) If true, then we want to use and INDEX() function to return the value from D3, if not, return 0 =IF(INDEX(...)=C$40,INDEX($D$3:$D$7,C$39),0)
    4) Enter that function in C41. Then copy C41 and paste/fill into C41:AL41.
    5) Repeat step 4 in C42, C43, C44, replacing the references for person 1 with appropriate references for person 2, person 3, person 4.

    Now, you can enter your values in the tables at the top of the sheet, and those entries/edits should be reflected in the chart table and in the chart.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  2. #2
    Registered User
    Join Date
    01-10-2024
    Location
    Canada
    MS-Off Ver
    2016
    Posts
    12

    Re: 2-D Stacked bar chart

    Thanks MrShorty. Now that we have a new single table, how do you think we can fix the legend/chart color problem?

  3. #3
    Registered User
    Join Date
    01-10-2024
    Location
    Canada
    MS-Off Ver
    2016
    Posts
    12

    Re: 2-D Stacked bar chart

    That makes sense, thank you. I have another question now. What if there is a delay between two tasks (for example, what if person 1 starts his first task at 6:00 and finishes at 7:00, but he doesn't start his second task until 7:05)? I guess in the current format, the tasks need to be done back to back, right?

+ 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] Combine stacked columns and stacked bars in a chart
    By maboho93 in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 02-09-2018, 07:52 AM
  2. Replies: 5
    Last Post: 12-09-2015, 12:41 PM
  3. Stacked bar chart with stacked secondary axis markers - please help!
    By Boardlady in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 07-22-2013, 10:32 AM
  4. Replies: 1
    Last Post: 05-30-2013, 10:03 AM
  5. How can I combine a stacked bar chart with stacked colum chart?
    By Sin in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 12-19-2005, 11:55 PM
  6. Replies: 1
    Last Post: 03-26-2005, 02:06 PM
  7. [SOLVED] To create a stacked column chart and group the stacked bars togeth
    By Jacqueline in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-18-2005, 10:06 AM

Tags for this Thread

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