Recently, Bluetaurean asked in the Chandoo.org Forums about ways to allocate work durations for various product lines across 24 hour days to create a daily schedule.
Both formula-based and VBA-based solutions were offered.
Today at formula Forensics we will take a look at the formula-based approach.
As always at Formula Forensics you can follow along, Download Here – Excel 2007-2013.
Set the Scene
Since one might encounter a similar need in a variety of contexts (manufacturing, engineering, project planning, etc.), we will look at a more general problem of allocating a set of tasks and corresponding durations to one or more days, as shown in the following diagram.
We will create two output views:
- One that is a flat list that can then be manipulated further using Excel’s Pivot table feature, and
- Another view that mimics a pivot-table (and is similar to a typical project Gantt view, but with actual values listed instead of a bar chart).
You can follow along using the attached Excel document. Download here Excel 2007+
Problem Specifics
- We have a list of tasks and their durations.
- We need to distribute the tasks to different days, without exceeding the maximum available duration in a given day.
- When the hours in a day are “used up”, we need to allocate the remaining task duration to the next day, and so on.
- On the other hand, if a given task does not use up all of the hours in a given day, we will need to assign more than one task for that day, provided the combined durations do not exceed the available hours for that day.
- In other words, we will need to split a task across one or more days, or combine one or more tasks into a single day, as needed, to maximize the work performed in a given day.
Developing the Approach
Before we tackle this problem in Excel, let us review how we might do this manually. Like most things, we might use the following three step process:
- Take the first task and assign its duration to Day 1. If the task’s duration exceeds the maximum hours available in a day, allocate the portion of the duration that does not fit into Day 1 into Day 2.
- Take the second task, and see whether it can fit into an existing day, or whether it needs to be distributed to multiple days
- Etc. (OK… so that three-step process was a stretch!)
Statistics show that most people think in terms of IF-THEN-ELSE statements. So here it is…
For a given Day, and for a given Task, If [Hours Not Allocated For that Task] > [Hours Available for that Day] Then Set Duration for that Day as [Hours Available for that Day] Else Set Duration for that Day as [Hours Not Allocated for that Task] EndContinue the above evaluation until all tasks have been allocated to days.
Of course, the above IF() logic can be condensed as follows:
MIN( [Hours Not Allocated For that Task] , [Hours Available for that Day] )
Putting it All Together: Output Option 1: Gantt-like View
Let us employ the above approach to create the Gantt-like view.
To make our approach more generic, we will use an Excel Name called “MaxHrsPerDay” to indicate the maximum available hours in a given day. (In the sample worksheet, it has been set to 24 hours.)
Our source data is setup as shown in the diagram below:
- Tasks are in the range A2:A5
- Durations are in the range B2:B5
We will create the output in a separate worksheet, in the range A1:E5 as shown below:
Put the following formula into cell A2 and copy down to A5:
=SourceData!$A2
(This formula is merely referencing the values from the SourceData sheet. The sample workbook also includes an approach to make this reference more location independent.)
Put the following formula in cell B2, and copy it down and right:
=MIN((SourceData!$B2-SUM($A2:A2)), (MaxHrsPerDay-SUM(B$1:B1)))
Setup the header row (B1:E1) as desired. (I have used text values for the header. You could also calculate the header text using formulas. Since that is straightforward, I will leave that as an exercise for the reader.)
Now let us look at what the formula in cell B2 is doing:
- SUM($A2:A2) is calculating the sum of the allocated durations for TaskA. (Please note the use of absolute and relative references. The formula is anchored on column A, but the starting row, ending row and ending column are free to expand.) SUM($A2:A2) returns zero since SUM() ignores text values.
– If you look at cell C2, the reference changes to SUM($A2:B2).
– In cell B3, the reference changes to SUM($A3:A3). You get the idea
- (SourceData!$B2-SUM($A2:A2)) calculates the difference between the duration for TaskA (40 in the example) and the hours allocated as of that point (0), to return 40-0=40.
- SUM(B$1:B1) is calculating the sum of the allocated hours for Day1. (Again, we are using a combination of absolute and relative references to keep the calculation anchored on column B.) In this case, the value is zero, since this is the first allocation for Day1.
- (MaxHrsPerDay-SUM(B$1:B1)) calculates the hours remaining (i.e. available) for Day1. Since this is for cell B2, the calculation returns 24 – 0 = 24.
That is it!
We put those absolute and relative references to good use!
This approach was easy because all we had to do was calculate the duration for a given task for a given day.
On the other hand, if we had to figure out what the Task was, or which Day it was, the calculation gets a little more involved. Since this is “formula forensics”, we would not have it any other way! 🙂
Putting it All Together: Output Option 2: A Sequential List of Tasks and Durations for Each Day (i.e. a Flat List)
As before, we will use the Excel Name “MaxHrsPerDay” to refer to the maximum hours in a Day.
As shown in the following diagram, we will turn the source data into a flat list of Days, Tasks and Durations:
Unlike with VBA, since a formula cannot choose which row and column to write its output, we have to set the formula in every cell where we suspect there might be a value.
In the above sample diagram, we copy the formulas from row 2 to row 9. However, row 9 shows “…” indicating that the list was completed by row 8.
Let us look at how to determine the value for Day, Task and Allocated Duration.
For ease of description, I have created the following Excel Names:
WorkList: =A2:A5 in the source data.
WorkDuration: =B2:B5 in the source data
While creating the Gantt-like view earlier, we were able to take advantage of the static “Day” and “Task” values to determine the Remaining Duration, Available Duration, etc. Since we now have to determine all three values (Day, Task, Allocated Duration), we will need some “helper” data.
We will add a column alongside the source data that shows the cumulative duration (for reasons that will become clear shortly), as shown in the following diagram:
Cumulative Duration is calculated as the sum of all durations up to a given row.
- For example, in cell C2, the Cumulative Duration is 40.
- In cell C3, the Cumulative Duration is 40+20=60
- And so on.
For ease of referencing, we will use an Excel Name called CumulativeDuration =C2:C5.
Let us look at why we need the “CumulativeDuration” helper column:
The circular logic problem
In order to determine the durations already allocated for a given day, we will need to know which Day it is.
We also need to know which Task we are trying to calculate the duration for.
So… do we calculate the Day or the Task or the Duration first?!! As you can imagine, that will soon land us in some circular logic.
Some helpful observations about the output:
- In column C of the output (on worksheet FlatList), the sum of allocated durations adds up to the total duration for all tasks. (No surprise here!)
- If every task had duration equal to the MaxHrsPerDay, you would have the same duration value for all days. (Not surprising, but interesting!)
- In other words, you could think of the Allocated Duration column as the total duration for all tasks, allocated MaxHrsPerDay at a time.
- Now we need a way to iterate through the duration values one at a time and account for the durations already processed. In other words, each value needs to contain all of the previous values. Welcome to an array of the cumulative durations!
- For example, in the cumulative array “{40;60;65;80}”, the value 60 already includes the previous value 40 in it. This allows us to subtract all durations allocated up to a given row, to get the duration value that is remaining to be allocated.
- Since Excel is good with numbers, we will base the calculation for AllocatedDuration and Tasks on the Duration values.
- By calculating the two values separately, we avoid the circular logic.
Let’s now look at the formulas for Day, WorkItem and AllocatedDuration.
It would be easier if we looked at the formulas in reverse order, starting with AllocatedDuration, then WorkItem, and finally Day.
Formula for “AllocatedDuration”
Enter the following formula into cell C2, ending with Ctrl+Shift+Enter, as shown in the following diagram:
=IF(SUM(C$1:C1)>=SUMPRODUCT(WorkDuration), “…”,MIN(INDEX(WorkDuration, MATCH(TRUE, CumulativeDuration-SUM(C$1:C1) > 0, 0)) – SUMIFS(C$1:C1, B$1:B1,B2), MaxHrsPerDay-SUMPRODUCT((A$1:A1=A2)* IF(ISNUMBER(C$1:C1), C$1:C1, 0)))) Ctrl+Shift+Enter
Let us look at the formula closely (using the formula in row 2):
- SUMPRODUCT((A$1:A1=A2)* IF(ISNUMBER(C$1:C1), C$1:C1, 0)) -> This calculates the sum of all allocated durations up to the previous row, where the Day = current row’s day. Please note the use of absolute and relative references. They allow us to expand the range as we go down the rows, while remaining anchored to the first row.
– Since this is the first data row, C$1:C1 returns “Allocated Duration” and the ISNUMBER() function returns FALSE, and consequently, the IF() function returns 0.
– A$1:A1 returns “Day”, and the test A$1:A1=A2 returns FALSE. Please note that in this case, it does not matter whether A2 has a value in it, whether it has the value 1, etc.
– SUMPRODUCT() provides the result of FALSE * 0 = 0
- MaxHrsPerDay – SUMPRODUCT((A$1:A1=A2)* IF(ISNUMBER(C$1:C1), C$1:C1, 0)) -> This calculates the difference between maximum duration available for a day and the sum of durations allocated for the current day. In other words, it calculates the available duration for the current row’s day.
– In this example, the calculation results in MaxHrsPerDay (24 in our example) – 0 = 24
- SUMIFS(C$1:C1, B$1:B1,B2) -> This calculates the sum of all allocated durations for the current row’s task. Since B$1:B1 is the text value “Work Item”, the SUMIFS() returns 0. Again, it does not matter if B2 is blank or has a value like “TaskA”, since Excel correctly evaluates the condition whether B$1:B1 equals B2.
- SUM(C$1:C1) -> This calculates the sum of all allocated durations up to the previous row.
- CumulativeDuration — SUM(C$1:C1) -> CumulativeDuration evaluates to {40;60;65;80}. SUM(C$1:C1) evaluates to zero. As such, the expression evaluates to {40;60;65;80} – 0, or {40;60;65;80}.
– If we look at the calculation for this expression in cell C3 (the expression would be “CumulativeDuration—SUM(C$1:C2)”), we would get the result of {40;60;65;80} – (0+24) = {16;36;41;56}. (As you know, subtracting a scalar value from an array results in an array with each value reduced by the scalar value.)
– If we look at the calculation for this expression in cell C4 (the expression would be “CumulativeDuration—SUM(C$1:C3)”) , we would get the result of {40;60;65;80} – (0+24+16) = {0;20;25;40}
– As you can see, each successive calculation reduces the CumulativeDuration array by the amount of hours already allocated. By reducing the CumulativeDuration array in this fashion, we ensure that we do not “double count” a duration.
– If a value in the array evaluates to zero, it means the corresponding duration has been fully allocated. (In cell C3, the first value in the array is zero, indicating that the original 40 hours has been fully allocated.) We will put this knowledge to good use in the next expression.
- MATCH(TRUE, CumulativeDuration—SUM(C$1:C1) > 0, 0) -> The expression CumulativeDuration—SUM(C$1:C1) > 0 evaluates to ={TRUE;TRUE;TRUE;TRUE} because all values are greater than zero. By performing a MATCH() for TRUE, we are able to find the first location in the array that has a non-zero value.
– If we look at the result of this expression in cell C3, we get {16;36;41;56} > 0 = {TRUE;TRUE;TRUE;TRUE}
– If we look at the result of this expression in cell C4, we get {0;20;25;40} > 0 = {FALSE;TRUE;TRUE;TRUE}
– As you recall, the zero values (or FALSE) correspond to the durations that have been fully allocated, whereas, the non-zero values (or TRUE) correspond to the durations that have NOT been fully allocated.
– It is helpful to note that MATCH() returns the LOCATION of what it finds. As such, the returned location is that of the first duration value that has not been fully allocated! Since the CumulativeDuration array is the same size as the WorkDuration array, we will be able to put this returned location value to good use in the next expression.
- INDEX(WorkDuration, MATCH(TRUE, CumulativeDuration — SUM(C$1:C1) > 0, 0)) -> By using the location value (of the first duration value that has not been fully allocated), we find the corresponding original duration value from the WorkDuration array.
– As we saw earlier, the expression “CumulativeDiration – SUM(C$1:C1)” reduces the CumulativeDuration by the duration values allocated to that point. However, the resulting array could have partial duration values as well. By referencing the corresponding duration value from the WorkDuration array, we ensure that we retrieve the original (full) duration value that was to be allocated.
- MIN(…) -> This expression calculates the value of MIN([Hours Not Allocated For that Task], [Hours Available for that Day])
– [Hours Not Allocated For that Task] is returned by INDEX(WorkDuration, MATCH(TRUE, CumulativeDuration—SUM(C$1:C1) > 0, 0)) – SUMIFS(C$1:C1, B$1:B1,B2)
– [Hours Available for that Day] is returned by second half of the MIN() expression: MaxHrsPerDay—SUMPRODUCT((A$1:A1=A2)* IF(ISNUMBER(C$1:C1), C$1:C1, 0)).
– So, we essentially got back to the logic we started from, which is the same logic we used for creating the Gantt-like view as well.
- The remaining portion of the formula (the IF() check) determines if all of the hours have been allocated. If all hours have been allocated, it returns “…”.
– SUMPRODUCT(WorkDuration) -> This expression calculates the total of all work duration values. In cell C2, it evaluates to SUMPRODUCT({40;20;5;15}) = 80
– SUM(C$1:C1)>=SUMPRODUCT(WorkDuration) -> Determines if the sum of durations allocated up to that point is greater than the total for all durations. (Since this is part of an array formula, you could also use the SUM function in place of SUMPRODUCT. But I am partial to the SUMPRODUCT function!! So, unless you are in a competition where the winner is determined by the shortest formula, feel free to use either one!
Formula for “WorkItem”
Enter the following formula into cell B2, ending with Ctrl+Shift+Enter, as shown in the following diagram.
=IF(SUM(C$1:C1)>=SUMPRODUCT(WorkDuration), “…”,INDEX(WorkList, MATCH(TRUE, (CumulativeDuration-SUM(C$1:C1)) > 0, 0))) Ctrl+Shift+Enter
You are already familiar with most of the formula components since you saw them in the formula for AllocatedDuration. The only difference is that in this formula, we are returning a value from WorkList. (i.e. we locate the position of the first non-zero duration in CumulativeDuration array, and since that array is the same size as the WorkList array, we are able to find the first Task that has not been fully allocated.)
Formula for “Day”
Enter the following formula into cell A2, ending with Ctrl+Shift+Enter, as shown in the following diagram:
=IF(SUM(C$1:C1)>=SUMPRODUCT(WorkDuration), “…”, MAX( N(A1) + (SUMIFS(C$1:C1, A$1:A1, A1)>=MaxHrsPerDay), 1)) Ctrl+Shift+Enter
Let us look at the formula in detail (using the formula in row 2):
- SUMIFS(C$1:C1, A$1:A1, A1) -> This expression calculates the sum of all durations (in column C) where the Days (in column A) equal the previous day.
– In cell A2, this expression evaluates to “SUMIFS(“Allocated Duration”, “Day”, “Day”)” = 0. (Excel smartly ignores any non-numeric values in the first argument.)
– In cell A3, this expression evaluates to “SUMIFS({“Allocated Duration”;24}, {“Day”;1}, 1)” = 24.
- SUMIFS(C$1:C1, A$1:A1, A1)>=MaxHrsPerDay -> This expression checks if the sum of all durations where the Days equal the previous day is greater than or equal to MaxHrsPerDay.
– In cell A2, this expression evaluates to FALSE
– In cell A3, this expression evaluates to TRUE
- N(A1) -> This expression returns the numeric value for its argument. Since N() returns zero for any non-numeric arguments, we use this function to return zero for the heading (“Day”) in A1. (Any numeric values are returned as is.)
- MAX( N(A1) + (SUMIFS(C$1:C1, A$1:A1, A1)>=MaxHrsPerDay), 1) -> The first argument of the MAX function “N(A1) + (SUMIFS(C$1:C1, A$1:A1, A1)>=MaxHrsPerDay)”returns the next increment for day, if the previous day has been fully allocated. Otherwise, it returns the same value as the previous day.
– In cell A2, this expression evaluates to MAX( N(“Day”) + (SUMIFS(“Allocated Duration”, “Day”, “Day”)>=24), 1), which evaluates to MAX( N(“Day”) + (0>=24), 1), which evaluates to MAX( 0 + (FALSE), 1), which finally evaluates to 1.
– In cell A3, this expression evaluates to MAX( N(1) + (SUMIFS({“Allocated Duration”;24}, {“Day”;1}, 1)>=24), which evaluates to MAX( N(1) + (24>=24), 1), which evaluates to MAX( 1+ (TRUE), 1), which finally evaluates to 2 since 1 + TRUE = 2.
Download
You can download a copy of the above file and follow along, Download Here – Excel 2007-2013.
Final Thoughts
While we used the same basic logic for both output options in this article, there are probably many other ways to tackle the age-old problem of production scheduling.
I would love to hear about some of your ideas, as well as ways to extend the concepts described here.
In the meantime, I wish you continued EXCELlence!
Sajan.
Other Chandoo.org Posts related to Scheduling
Here at Chandoo.org you can find the following related posts:
http://www.chandoo.org/wp/2010/11/18/scheduling-variable-sources/
http://chandoo.org/wp/2009/06/16/gantt-charts-project-management/
http://chandoo.org/wp/project-management-templates/gantt-charts/
Thank You
This was Sajan’s second post at Chandoo.org and so a special thank you to Sajan for putting pen to paper to describe the technique here.
You may want to read Sajan’s first post here or thank him in the comments below:
Formula Forensics “The Series”
This is the 31st post in the Formula Forensics series.
You can learn more about how to pull Excel Formulas apart in the following posts: Formula Forensic Series
Formula Forensics Needs Your Help
I need more ideas for future Formula Forensics posts and so I need your help.
If you have a neat formula that you would like to share like above, try putting pen to paper and draft up a Post like Sajan has done above or;
If you have a formula that you would like explained, but don’t want to write a post, send it to Hui or Chandoo.

























106 Responses to “Waterfall Charts using Excel”
First of all, great post. Second, an extra thought on the usefulness of waterfall charts in general:
Waterfall charts are best employed when a stacked bar (or, as I cringe, a pie chart) won't suffice because some of the "contributors" contribute negatively. This example is very helpful to get the basic technique down, but some extra math and series would need to be added to accommodate common waterfall chart applications (cash flow analyses, marketing mix, etc.).
Jon's add-in does this, I think (at least, based on the screenshots). It can be done without an add-in, but it takes a moment to get the math down on what you're referring to as 'Base Values' in this example (the transparent spacer series).
This is an incredibly useful program. In my job, I have found several uses for it already!
Thanks Aaron for taking th time to educate us!
Hi, nice tutorial, thanks Aaron and Chandoo. This also works in 2003, although some of the stages are very slightly different.
One possible improvement - some of the connecter lines may look as if they are slightly out of step with the blocks - in the final chart the one between "north" and "east" looks slightly too high. I also got this when I followed the tutorial. You can play around with borders for the element series - either turn them off completely, or make them the same colour as the fill colour, and play around with the line weight. If that doesn't work, consider adding in a small number to the connector values to offset them slightly.
Hi, That's a nice way to draw waterfalls. For a different take on waterfall charts, you might look at my post on how to draw them using scatter charts at;
http://www.edferrero.com/Blog/tabid/106/EntryID/16/Default.aspx
Thanks for the post. We use them all the time. As noted in an earlier comment, it would be great to adjust this so it can handle negative values, and color-code the negatives in red and positives in green.
For easier math and handling negative values:
Three colums of data, labels then the start and end points
In the chart wizard choose Line Chart and the 1st option - upper left hand corner of the dialog
Double Click on one of the Lines - select Format Data Series Select Options: Up Down Bars
Select each line; Patterns, Line, None
And Bob's your uncle.
This approach does not have Chandoo's nice connector lines - but it is easy to implement.
Great add, Bob. Two more things:
1) The up/down bars are based on the first and last series provided. You can add the line connectors like Aaron's chart has by adding a series for each line segment to the middle of the data table. Could be an easier way to do this, but hey... this worked.
2) I didn't like that the first datapoint (2008 in my example) and last (2009) were the same color as up bars. I see those as absolutes, and the up/down bars should be for the changes (Chg1-4). So, I added an absolute volume series (named Vol) and changed its chart type to Bar.
3) Using the same trick that Aaron explains, you can also add data labels. I didn't.
Bob's (in rows instead of columns):
Label 2008 Chg1 Chg2 Chg3 Chg4 2009
Start 0 100 110 100 55 0
End 100 110 100 55 125 125
Mine:
Label 2008 Chg1 Chg2 Chg3 Chg4 2009 Note
Start 100 110 100 55 UpDown
Vol 100 125 Type=Bar
Line 100 100 Type=Line
Line 110 110 Type=Line
Line 100 100 Type=Line
Line 55 55 Type=Line
Line 125 125 Type=Line
End 110 100 55 125 UpDown
Obviously, more cumbersome to set up but...
Grrr... attempt #2...
Bob's (in rows instead of columns):
_Label __2008 __Chg1 __Chg2 __Chg3 __Chg4 __2009
_Start _____0 ___100 ___110 ___100 ____55 _____0
___End ___100 ___110 ___100 ____55 ___125 ___125
Mine:
_Label __2008 __Chg1 __Chg2 __Chg3 __Chg4 __2009 Note
_Start ______ ___100 ___110 ___100 ____55 ______ UpDown
___Vol ___100 ______ ______ ______ ______ ___125 Type=Bar
__Line ___100 ___100 ______ ______ ______ ______ Type=Line
__Line ______ ___110 ___110 ______ ______ ______ Type=Line
__Line ______ ______ ___100 ___100 ______ ______ Type=Line
__Line ______ ______ ______ ____55 ____55 ______ Type=Line
__Line ______ ______ ______ ______ ___125 ___125 Type=Line
___End ______ ___110 ___100 ____55 ___125 ______ UpDown
OK, guys: I didn't get it at all, but God knows I've tried to !!
I can't download the sample @the office, but I'm wondering if you can lead me thru this example: I have a list of countries on col C, values for each Line Of Business on clos D and E, and total in col F.
I'd like to create the waterfall chart to show how each country contributes to the total.
How do I do thaT??
thanks !!
PLease disregard my previous post, I think i hadn't enough caffeine on me.....i totally did it !!
@Martin: Cool. Here is to Coffee and passionate users like you. Cheers!
thanks master !!
I've actually gone a step further, and combined the chart with a data validation filter, and the result was really impressive, a dynamic waterfall chart, without a single macro line !!!
Commenting this with a colleague form Finance, he mentioned that in this case (showing info from offices and getting to a region total), waterfall might induce to a confusion, as one might be tempted to understand that a certain office's numbers is based on the previous shown, and reluctantly, i had to agree with that vision.
Still, I love the results !!!
Rgds,
Martin
Outstanding tips. I never experiment that much. Thanks for this nice tutorial. Next time I definitely teach my younger brother about it. Again thanks.
I wish I could use waterfall charts with pivot tables and Dynamic number of data elements (which is why I use pivot tables). My main issue is related to data elements. I have charts I update every month for every project. So each project has its own set of charts (same charts with each project). However, each project might have 0 to 12 data elements. And every month the number of data element can change for each project. I do not see how I could do waterfall charts without a lot of work when I change the number of data points.
@Brian... One idea: you can take the above tutorial and create waterfall chart with 12 bands and then save it as template. Then next time you need to use a waterfall chart, just use it and set the blank elements as NA().
Another option is to try Jon's utility. It is a pretty good tool and takes care of most of this work automatically.
[...] please welcome Aaron Henckler as the Member of Month. Aaron has contributed a beautiful tutorial on creating waterfall charts using excel during the last month. He taught me few cool charting tricks through that. Thank you [...]
on http://www.hichert.com/de/software/exceldiagramme/55
there are some examples for waterfall charts.
Diagramm 675 (Rätsel 3)
Diagramm 657, 656, 655
if you mouse-click on the chart you can download the corresponding xls-file.
have also a look on the new poster HI-SUCCESS-Rules for information design.
brochure in english
http://www.hichert.com/downloads/media/broschueren/brochure_2008_en.pdf
poster preview
http://www.hichert.com/de/shop/poster/203
[...] to Aaron, who guest posted about excel waterfall charts in August. In august, I have turned my attention towards the pivot tables and wrote Excel Pivot [...]
This is the best tutorial on Waterfall Charts!
@Chrisham.. no arguments there, Aaron really did a splendid job on this one.
Hi Chandoo,
Another firsts of its kind though there are many who claim to have prepared the first free version of waterfall charts and want their name to be entered in Guinness World Records but I've seen none.
My request is please update this note as you best know waterfall charts (WC)are best employed when a stacked bar or a pie chart won’t suffice because some of the “contributors” contribute negatively but above chart did not cover this aspect and also add some more templates of revised watefall charts
Thanks and best regards
Fakhar
PS: Thanks again for always taking time out from your very busy schedule for quick/timely response to our queries
To add another wrinkle, any thoughts on how to go from negative to less negative to positive numbers? We have a quarterly loss, trying to go from the GAAP to non-GAAP adjusted, which goes from a loss of 500 to loss of 100 to profit of 400 for example.
@Jeff... I am not sure, but waterfalls are not ideal for showing negative bars. But I have a weird suggestion. Try changing the axis settings so that horizontal axis crosses vertical axis at -600 instead of 0.
Jeff:
See my comment from August 11, 2009 and Seth's followup the same date. Nice simple approach that accomplishes your objective. An excellent alternative is to get Jon Peltier's Waterfall add-in - it does everything.
Great thanks Aaron,
This works really well for constantly incrementing series (ie. when you are always moving up as you move right)
It can be pretty easily adapted for changes which involve declining values by altering the base to always be the lowest number in the two connector series and using the absolute value for the Element Value.
I've come up with an improved template that handles negative values just fine. I'll see if I can figure out how to post it.
Hmm, can't find an easy way to share the file. If anyone's interested, let me know. Basically, you paste in three columns: labels, before, and after. THe excel I made up witll produce a waterfall chart with a starting and ending total, and provide green/red step bars, with dotted line connectors, for positive and negative deltas, respectively.
Todd, coul you please mail me your template? i would appreciate it: martin.tobon at gmail
Thanks
@Todd
Have a look here
http://chandoo.org/forums/topic/posting-a-sample-workbook
Thanks! So, the link is: http://rapidshare.com/files/416227351/Cheese_Waterfall_Template.xlsx
The filds highlighted in gray are all formulas, so don't need to be touched. It's not the cleanest (I should be able to condense it a bit), but it works for now.
Thanx! This is really helpfull and it works great in 2003. I was adjusting my graphs in Illustrator to get the message right :$ This is much more convenient and looks the way it should look.
Hi Todd,
The link is gone ; can you please re load, thanks!
Thanks
Have been using waterfalls for a long time.. this is very useful
For animated waterfall charts you can try http://www.fusioncharts.com/powercharts/charts/waterfall/ (This is one of the best product created by an Indian guy when he was 17 year old). I also checked his latest speech at Nasscom Emergeout Kolkata on 28th, 2011. They have clients like Google, Facebook, US Gov etc.
Thought of mentioning it here :), great work!
GREAT tutorial. Was able quickly replicate and then adapt for my uses.
Hello Aaron,
The post is Nice & useful.
But only for ascending data.
If any fall will come into account then this template would not support.
So if possible then Guide for Any fall between the raising Data.
Hi
Great post this and thanks for that. However I'm stuck in the last step and cannot link the label value to the element value. I'm using Excel 2010. Any help ?
Spoke too soon ! I was typing in the label box instead of the address box ! Works perfectly now !
Please please explain how to display negative values that contribute to the total
tnx in advance
Can this be done in Excel 2002 (what my company has). It seems to fall down for me in step 3, as there doesn't appear to be an option in Excel to convert the series to a line.
This just made my life a whole lot easier today. Thanks so much for sharing. Some of us have NO talent for this type of thing and when someone like me can make this work...all I can write is: May Many Good Blessings Fall Upon You!
Thank you so much for putting on web these easy to follow and clear instructions on creating waterfall charts. I have just done two and it was quite simple process.
Will come back for more tutorials!
Hi Todd, could you please re-upload your waterfall chart to deal with negative value?
Thank you a lot!
Hi Todd - Can you re update your waterfall chart? I am attempting to chart negative values in the midst of positive values and am having a hair raising experience.
Thanks so much!
Hi Todd
Could you please repost oyour waterfall chart. I am attempting to chart some negative values in the midst of postivie values. It is truly a hair raising experience.
Thanks much
Tina - please see comments 6 and 7 above.
This is cool! Thank you so much for sharing. Of all the approaches I explored, Aaron's is the easiest to understand.
GREAT post! I used to be a consultant and had this macro automatically built into my powerpoint program. I'm in a new job now and was so happy to find this tutorial to be able to show this kind of analysis again. Thanks!!
Can you post an example excel file of this tutorial with waterfall ups and downs showing the connector lines? How do you lay it out I cannot get it to work and keep connector lines despite a 3 columns attempt and a few cups of coffee
Cheers Chandoo and Co!
@Callan
Did you download the file in the section above
Download the Waterfall Chart Template:
Please download the waterfall chart template from here [.zip version here]
One extra hack I did on this feature was add a mechanism to arrange the columns in order from greatest to least without using vba. I used a combination of a unique_id, the max() function and the vlookup() function. I also set the series label dummy to be 20% of the biggest bar height or a minimum of n. I am using this as part of a display for an input page--the chart reorganizes and relabels with all sorts of different scales. I uploaded a file here: http://www.kaahlsfiles.com/excel/
This was very useful and well explained. I followed the steps and did it all myself.
Thanks heaps.
Chandoo - I am using Excel 2010. Was able to navigate the tutorial without a hitch until the end. I cannot get Step 9 to work. Any advice?
@Chrs
"Click a third time on the edge of the box that appears and then type the equals sign “=”. Now go back to your data table and click on the cell of the Element Value that you want appear in the label. Then press enter."
What this should say is Select the labels for the series, then select an individual label by selecting it again. With just an individual label selected, type a formula in the Formula Bar =$A$10 (Change to suit)
Press enter.
there is not any critical plus and minus data for water fall chart so if its possible then plz add some increasing and decreasing value typ chrat....and thanks for ur tutorial..
Superb stuff. Always wanted to know how to do this. very much appreciated.
I used to to these kind of charts by myself before, but it took me a lot of time... My company has just installed an excel add-in, which allows you to make a rather nice and very easy to make waterfall chart; it's called Upslide (www.upslide.net), and it's rather great!
Great tutorial. Had to fiddle about to display negatives properly (subtracting them from the base)- but looks good. Thanks for taking the time to post this.
I don't know why companies never really teach you how to use the basic software you are provided with; I always feel like an XL dummy, but this waterfall diagram trick is pretty nice and worked for me. I have seen business development folks reduced to drawing them in powerpoint, which takes ages and if you need to make a change that causes some sweat and tears. Now I, a mere R&D guy, can get nice value proposition waterfalls for projects and change them painlessly too. Thanks for the post!
Hi chandoo,
I have a two row and 7 column data and i have followed the steps as per the tutorial.
But i am not able to implement 3rd step while doing it my one of the data vanish. I tried it with all colors, and ultimately my chart got blank.
Thanks
I've been running charts like this for a couple of years in Excel 2002. I have it set up as a template for others in my prior department to use in their presentations. It's quite versatile and works for them well...but the labels all fail in Excel 2007. I've got labels that are not manually linked as described above, but rather I've created addtional series to hold the labels. The Y value is the Y value of the series I'm labeling, and the x-value is the TEXT version of the gap number I want to label. Then I set the label to show the x-value. Since the x values are text, they align with the other series' x axis and it has been working flawlessly. Any way to automate labeling like this in Excel 2007? Shy of an add-in?
Try this site, http://www.waterfall-chart.com/
You enter your data, and receive a waterfall as an Excel file.
Besides, the labels are nicely handled.
Great explanation.
You may want to try, too if you have to create many waterfalls or create perfect waterfalls fast including negatives.
http://lacs.xtreemhost.com
Wow, this was the most helpful and easy to follow set of directions I have ever found! Thank you so much!!
I wanted to automate this process so wrote a little sub to take care of it. However it won't handle negative values or a falling waterfall chart (only rising). They are on my todo list.
[code]Sub WaterfallChart()
Dim i As Integer
Dim sum As Double
Dim base As Double
On Error GoTo Err1:
Dim x
x = Selection.Value
ThisWorkbook.Sheets.Add
Range("a1").Activate
Range("A1").Value = "Axis Labels"
Range("b1").Value = "Base Values"
Range("c1").Value = "Element Values"
Range("d1").Value = "Label Spaces"
For i = 1 To UBound(x)
ActiveCell.Offset(0, 3 + i).Value = "Connector " & i
Next i
Range("a2").Activate
base = 0
For i = LBound(x) To UBound(x)
ActiveCell.Value = x(i, 1)
If i LBound(x) Then
ActiveCell.Offset(0, 1).Value = base
End If
ActiveCell.Offset(0, 2).Value = x(i, 2)
If i = 1 Then
ActiveCell.Offset(0, 4).Value = x(i, 2)
Else
ActiveCell.Offset(0, 2 + i).Value = base
ActiveCell.Offset(0, 3 + i).Value = x(i, 2) + base
End If
ActiveCell.Offset(0, 3).Value = 20
base = base + x(i, 2)
ActiveCell.Offset(1, 0).Select
Next i
ActiveCell.Value = "Total"
ActiveCell.Offset(0, 2).Value = base
ActiveCell.Offset(0, 3).Value = 20
ActiveCell.Offset(0, 3 + UBound(x)).Value = base
'Creating the Chart
Columns("A:A").Select
Range(Selection, Selection.End(xlToRight)).Select
Columns("A:H").EntireColumn.AutoFit
Range("a2", Range("a2").End(xlDown).Offset(0, 3 + UBound(x))).Select
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlColumnStacked
ActiveChart.SetSourceData Source:=Range("a2", Range("a2").End(xlDown).Offset(0, 3 + UBound(x)))
ActiveChart.PlotBy = xlColumns
ActiveChart.Axes(xlValue).MajorGridlines.Select
Selection.Delete
'Create Connectors
For i = 4 To UBound(x) + 3
ActiveChart.SeriesCollection(i).Select
ActiveChart.SeriesCollection(i).ChartType = xlLine
With ActiveChart.SeriesCollection(i).Format.Line
.Visible = msoTrue
.ForeColor.ObjectThemeColor = msoThemeColorText1
.ForeColor.TintAndShade = 0
.ForeColor.Brightness = 0
End With
With ActiveChart.SeriesCollection(i).Format.Line
.Visible = msoTrue
.Weight = 0.25
End With
With ActiveChart.SeriesCollection(i).Format.Line
.Visible = msoTrue
.DashStyle = msoLineSysDash
End With
Next i
'remove legend and hide data series
ActiveChart.Legend.Select
Selection.Delete
ActiveChart.SeriesCollection(1).Select
Selection.Format.Fill.Visible = msoFalse
Selection.Format.Line.Visible = msoFalse
ActiveChart.SeriesCollection(3).Select
Selection.Format.Fill.Visible = msoFalse
Selection.Format.Line.Visible = msoFalse
'Apply Data Labels
ActiveChart.SeriesCollection(3).ApplyDataLabels
For i = 1 To UBound(x) + 1
ActiveChart.SeriesCollection(3).Points(i).DataLabel.Select
Selection.Formula = "=" & ActiveSheet.Name & "!R" & i + 1 & "C3"
Next i
Exit Sub
Err1:
MsgBox ("An error has occurred")
Exit Sub
Err2:
MsgBox ("Non-numeric data")
End Sub[/code]
I should have noted that data is entered in the following fashion:
North 20
South 10
East 40
West 30
Then select the data and run the Sub.
great article!
Seen a pre build waterfall chart builder that is really handy
http://www.excelwithcharts.com/topic7.html
go check it out!
this is AWESOME ... simply AWESOME
tx,
//andie
....and here we have some extreme waterfalls...like Iguaçu, Niagara, Victoria...lol...
http://www.hichert.com/en/consulting/exhibits/65
BOOM!
2012 Budget Bridge in picture form. Thanks Man!!!!
Brilliant! I really liked the waterfall chart! Will be coming back for more!
Thanks a bunch!
Thank you, Thank you. I spent hours trying to figure out how to fix my data labels for a waterfall I had cloned. Finally, I found this article and the part that says...
"Click a third time on the edge of the box that appears and then type the equals sign “=”. Now go back to your data table and click on the cell..."
There's no way anyone could discover that on their own!!
Wow.. never thought there's a tool to make me easier to analyze the growth of my company..
thanks a lot!! you're such a great help!
Check out this video:
http://www.youtube.com/watch?v=m2_wxkv2djg
Thank you so much! This is a wonderful tutorial and very clear even for an excel-challenged person such as myself!
It's really helpful! It helps me to answer my boss' question :p
THankss a lott
Thanks a lot.. Extremely useful post..saved me a lot of time and trouble.
How could I show more visually the third component of the waterfall chart is heavily dependent on the first and second?
I am trying to 'build a story' that the starting point (jump off point) for this year to next (final number) is dependent on three main components A, B and C. But C is dependent on success of A and B. So while the waterfall chart shows that A, B and C are component of from getting from this year to the next but it does not show the relationship between A and B with C.
Any idea how to do this more visually and powerfully?
Thanks!
[...] I just G**gled, Excel Waterfall Chart.... http://peltiertech.com/WordPress/exc...bridge-charts/ Excel Waterfall Chart - Tutorial and Template - Learn how to make waterfall charts using MS Excel | ... Create an Excel Waterfall Chart - YouTube Create Excel Waterfall Chart I hope that helps. [...]
How to you get the waterfall chart to work when the variable goes below the x axis? Lets say you are looking at how sales have translated into negative profits. You have the main sales bar and progressively with expense categories it goes below the line. The series that goes below the line will be part of the same series that you are removing in previous items e.g cost of sales to create the floating effect. Therefore I am left with nothing below the line as that series is artifically removed. Hopefully that makes sense.
@Ian
You have to add extra series just to cater for the negatives
Hey Chandoo,
This is a great example of using the classic set up for the waterfall chart while adding the connectors. This is actually the first time I have seen connectors used in the waterfall.
Thanks for sharing.
Hi, thanks for the post it's helped me create something more meaningful than what I was using previously. I'm stuck on something though, I'm using Excel 2007 and trying to add the horizontal lines between certain points on the stacks that show up as dotted on your chart. Can anyone advise how I can go about adding these using the options in Excel?
Cheers
Andrew
Feel free to use the waterfall chart template I created and let me know your feedbacks:
http://www.alainblattmann.com/index.php/excel/waterfall-chart-bridge-chart
Regards,
Alain
Thanks, Chandoo. Very useful article. Now I better understand how it works. But I found add-in. I made several templates with different configuration of charts and use it. Look at this http://fincontrollex.com/?page=products&lang=en
[…] - Thanks to Aaron Henckler at Chandoo.org for creating an excellent tutorial on waterfall chartsii - Thanks to Rob Bovey at AppsPro for creating a very useful add-in for labeling […]
If you have Excel 2013, try this one out
http://office.microsoft.com/en-nz/store/waterfall-chart-WA104068937.aspx?queryid=7ecf1b58-1265-4fef-be37-17dacbafd66f&css=excel&CTT=1
It's free and seems to handle all the weird cases.
Thanks guys, this really helped me in understanding and creating a good waterfall graph.
I'm just dropping by to let you know, that I've visited this post numerous times to help me with with my waterfall charts.
Thank you so much!
[…] Excel Waterfall Chart - Tutorial and Template - Learn how to make waterfall charts using MS Excel | … http://www.contextures.com/excelwaterfallchart.html Excel Waterfall Charts (Bridge Charts) - Peltier Tech Blog If you insert columns for the extra periods (rather than add them to the end) your charts will update automatically to the new columns. […]
Hi,
It was really helpful data. alothough it was difficult to implement on mulitple data but managed to do that.
Thanx>>>>>>
saurabh gupta
thanks! this helped me a lot
Thanks guys 🙂 its 2nd July, 2014 and this article is still very relevant and helpful!
Took a little reading up but I managed to edit it and expand it to cover more range, awesome!
Great help, my boss ask me to prepare and it was easy.
Phenomenal tutorial, worked perfectly and looks great!! It's sad that it takes so many steps to make this work in Excel, but the steps you laid out make such a better waterfall than the other tips I've seen elsewhere...
Thanx a lot aaron
I was struggling with some data and was not satisfied with the presentation, made it in waterfall today.
Wil b able to sleep tonite 😉
thanx again
Thank you for the post. Everything works great with the tutorial but when I decide to insert another row into the table (e.g., if I was to add another region to the above table) the corresponding chart breaks in that the connector with the new bar is not visible and I can't seem to find a way to create it. I end up recreating the chart from scratch. Any help would be greatly appreciated.
Excellent post. I have used waterfall chart many times in the past but automatic update of connectors was really useful. Thanks
A really nice step by step way of producing a waterfall chart. It all went well when I had positive values , however, once I had a negative value, the relative bar was shown below the X axis. Any solution for this ?
Hi Chandoo,
This waterfall chart doesn't work for negative values. How do you show a negative value?
Matt.
@Matt
That is a basic waterfall chart.
Negative values must be handled using a separate series just for the negative components
I'd suggest that you either:
1. Have a look at:
http://peltiertech.com/excel-waterfall-charts-bridge-charts/
or
http://www.contextures.com/excelwaterfallchart.html
2. Use Excel 2016 which has waterfall charts built in.
@Matt. Please see my comment from Aug 11, 2009 (6th comment from the top above). Nice simple way to handle waterfalls including negative values. The following comments from Seth adds some nice enhancements. Of course, Jon Peltier's utility is the best.
Many thanks. Excellent post. It was really useful for me.
Thank you!! This is very well explained and visually useful 🙂 helped me a lot! Thanks again!!
Great Explanation. Keep it up
Also see More robust waterfall chart taking care of Negative Values and diff color for negative values at
https://eduqfa.com/ultimate-waterfall-chart-excel/
Dear Chandoo
Could you kindly send me the waterfall chart in pdf format by email please.
Would be of great help
Best regards
Srinivasan H, Mumbai