Solved

Stacked Chart in Excel

Posted on 2013-10-29
2
268 Views
Last Modified: 2013-10-30
Hello all,

I have a spreadsheet of the times people logged in and out of a room. Taking two as an example:

Name      Date             Function      Start              End             Duration
Tom      07/10/2013      Absent      08:04      08:56      00:52
Tom      07/10/2013      Present      08:56      08:59      00:03
Tom      07/10/2013      Absent      08:59      10:02      01:03
Tom      07/10/2013      Present      10:02      10:12      00:10
Tom      07/10/2013      Absent      10:12      11:49      01:37
Tom      07/10/2013      Present      11:49      12:12      00:23
Tom      07/10/2013      Absent      12:12      13:39      01:27
Tom      07/10/2013      Present      13:39      13:50      00:11
Tom      07/10/2013      Absent      13:50      14:14      00:24
Tom      07/10/2013      Present      14:14      15:34      01:20
Tom      08/10/2013      Present      07:52      10:59      03:07
Tom      08/10/2013      Absent      10:59      12:58      01:59
Tom      08/10/2013      Present      12:58      13:24      00:26
Tom      08/10/2013      Absent      13:24      14:13      00:49
Tom      08/10/2013      Present      14:13      15:39      01:26
Tom      09/10/2013      Present      07:58      09:06      01:08
Tom      09/10/2013      Absent      09:06      12:27      03:21
Tom      09/10/2013      Present      12:27      13:26      00:59
Tom      09/10/2013      Absent      13:26      14:03      00:37
Tom      09/10/2013      Present      14:03      15:20      01:17
Tom      10/10/2013      Present      09:01      09:21      00:20
Tom      10/10/2013      Absent      09:21      10:10      00:49
Tom      10/10/2013      Present      10:10      10:12      00:02
Tom      10/10/2013      Absent      10:12      12:16      02:04
Tom      10/10/2013      Present      12:16      12:42      00:26
Tom      10/10/2013      Absent      12:42      13:59      01:17
Tom      10/10/2013      Present      13:59      16:03      02:04
Tom      11/10/2013      Present      07:44      09:37      01:53
Tom      11/10/2013      Absent      09:37      11:42      02:05
Tom      11/10/2013      Present      11:42      12:41      00:59
Tom      11/10/2013      Absent      12:41      14:08      01:27
Tom      11/10/2013      Present      14:08      14:38      00:30
Tom      14/10/2013      Present      11:24      11:25      00:01
Tom      14/10/2013      Absent      11:25      14:16      02:51
Tom      14/10/2013      Present      14:16      15:25      01:09
Pat      07/10/2013      Present      09:05      09:07      00:02
Pat      07/10/2013      Absent      09:07      10:07      01:00
Pat      07/10/2013      Present      10:07      10:14      00:07
Pat      07/10/2013      Absent      10:14      11:14      01:00
Pat      07/10/2013      Present      11:14      12:53      01:39
Pat      07/10/2013      Absent      12:53      13:33      00:40
Pat      07/10/2013      Present      13:33      13:51      00:18
Pat      07/10/2013      Absent      13:51      14:39      00:48
Pat      07/10/2013      Present      14:39      15:33      00:54
Pat      08/10/2013      Present      07:50      09:53      02:03
Pat      08/10/2013      Absent      09:53      11:32      01:39
Pat      08/10/2013      Present      11:32      12:13      00:41
Pat      10/10/2013      Present      09:01      09:32      00:31
Pat      10/10/2013      Absent      09:32      11:29      01:57
Pat      10/10/2013      Present      11:29      11:37      00:08
Pat      10/10/2013      Absent      11:37      14:08      02:31
Pat      10/10/2013      Present      14:08      15:57      01:49
Pat      11/10/2013      Present      08:02      09:56      01:54
Pat      11/10/2013      Absent      09:56      10:26      00:30
Pat      11/10/2013      Present      10:26      10:52      00:26
Pat      11/10/2013      Absent      10:52      11:51      00:59
Pat      11/10/2013      Present      11:51      12:38      00:47
Pat      11/10/2013      Absent      12:38      14:53      02:15
Pat      11/10/2013      Present      14:53      15:52      00:59
Pat      14/10/2013      Present      08:40      10:13      01:33
Pat      15/10/2013      Absent      10:13      11:43      01:30
Pat      16/10/2013      Present      11:43      13:02      01:19
Pat      17/10/2013      Absent      13:02      14:12      01:10
Pat      18/10/2013      Present      14:12      15:35      01:23

I'd like to present these in a horizontal bar chart such that:


                              [Date]

Tom | PPPPAAPPPAAAAAPPAAAAAA....
        |
        |
Pat   |PAAAPPPAPPPAAAAPPAAAPPAAA..
 
         <Time Start> -----------------------<Time End>

Where 'P' is the colour of the bar representing 'Present' and 'A' is the colour of the bar representing 'Absent'.

I've been at this trying as many permutations in Excel as possible without success. I've googled it and looked for solutions here without success. Can anyone advise, please?

Regards,

Seamie
0
Comment
Question by:Seamie_
2 Comments
 
LVL 21

Accepted Solution

by:
Ejgil Hedegaard earned 400 total points
ID: 39610345
Here is a setup for it.
See attached workbook.
Stacked-Chart-present-absent.xlsx
0
 

Author Comment

by:Seamie_
ID: 39611073
Wow! hgholt, that's amazing and so concise! I wondered whether I had described the issue sufficiently. Whether or not, you answered the problem excellently.

I'm looking forward to parsing out the solution.

Many thanks.

Seamie
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa‚Ķ

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question