April 2015

Thursday, April 30, 2015

How to create a Waterfall chart in Microsoft Excel

How to create a Waterfall chart in Microsoft Excel

Waterfall Chart

waterfall chart is a form of data visualization that helps in understanding the cumulative effect of sequentially introduced positive or negative values. The waterfall chart is also known as a flying bricks chart or Mario chart due to the apparent suspension of columns (bricks) in mid-air. Often in finance, it will be referred to as a bridge. Waterfall charts are used to show effects (cummulative) on positive and negative amounts. 
Example: Use an Excel Waterfall Chart net cash flows - helping you to visualize which periods had positive and negative results. 

The waterfall chart is normally used for understanding how an initial value is affected by a series of intermediate positive or negative values. Usually the initial and the final values are represented by whole columns, while the intermediate values are denoted by floating columns. The columns are color-coded for distinguishing between positive and negative values.



Set Up the Data

To create your own waterfall chart, the first step is to set up your data. In the screen shot below:
  • 5 columns have been inserted between the list of months, and the column with Net Cash Flow amounts
    • Base is a calculated amount for a series that will be hidden in the completed chart. It creates a starting point for the Up and Down series in the chart.
    • End is the final column in the chart
    • Down is a list of negative numbers in the net cash flow column
    • Up is a list of positive numbers from the net cash flow column
    • Start is the starting value, from the net cash flow column.
  • A row was inserted above the Start row, and it will create spacing at the left of the chart. An arbitrary value (2000) was entered there, and any number within the range of net cash flow amounts could be used instead.
  • An End row was inserted at the bottom of the months list
  • A row was inserted below the End row, and it will create spacing at the right of the chart. An arbitrary value (2000) was entered there

Enter the Waterfall Chart Formulas

  1. The next step is to enter the formulas that will be used in the chart. In the screenshot above, values are typed in the yellow cells, and other coloured cells contain formulas. 


B2: =" "
F3: =G3
B4: =SUM(B3,E3:F3)-D4
D4: = - MIN(G4,0)
E4: =MAX(G4,0)
C16: =SUM(B15,E15:F15)-D16


Copy the formulas in B4, D4 and E4 down to row 15

Create the Waterfall Chart

To create the waterfall chart: (For Excel 2007). For Excel 2013, right click and go to format data series


  1. Select cells A1:F17 -- the heading cells and data -- but don't include the column with the Net Cash Flow numbers.
  2. On the Excel Ribbon, click the Insert tab, and click Column Chart, then click Stacked Column
  3. Click on the Base series to select it, and format it with no fill and no border, so it isn't visible in the chart.
  4. Select one of the Down series columns, and format the series with red fill colour
  5. Select one of the Up series columns, and format the series with green fill colour
  6. Format the Start and End columns with grey fill colour
  7. Select any column, and on the Excel Ribbon, click the Format tab
  8. Click Format Selection, and reduce the Gap Width to a small amount, about 10-12%
  9. Remove the Legend



---
Waterfall definition courtesy of Wikipedia. 



Tuesday, April 14, 2015

Force CAPS on enter with Excel VBA

Force CAPS on Entry

Hate having to put your Caps Lock on or using the Shift key at all? Suppose you have a column in your Excel spreadsheet for entering County names in Column C, or you must enter T or F for True/False, or M or F for Male/Female. 

You keep missing it and typing it in lower case. Easy enough! This code changes any text entry in the designated range to upper case.

Place the following code on the ThisWorksheet code window. The Range ("C:C") can be changed to any range. C:C tells it to CAP any entry in the entire C column. You can change the range to anything you like, such as C1:C15.

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("C:C")) Is Nothing Then
    Target(1).Value = UCase(Target(1).Value)
End If
Application.EnableEvents = True
End Sub


Crack Sheet Protection Password in Excel with VBA

Password Cracker for Excel 

This routine provides a password to un-protect your worksheet. However, it may not give you the original password that was used. Open the workbook that has the protected sheet in it. Hit Alt+F11 to view the Visual Basic Editor. Hit Insert-Module and paste this code into the right-hand code window:
Sub PasswordBreaker()
 Dim i As Integer, j As Integer, k As Integer
 Dim l As Integer, m As Integer, n As Integer
 Dim i1 As Integer, i2 As Integer, i3 As Integer
 Dim i4 As Integer, i5 As Integer, i6 As Integer

 On Error Resume Next

For i = 65 To 66:
For j = 65 To 66: For k = 65 To 66
For l = 65 To 66: For m = 65 To 66:
For i1 = 65 To 66 For i2 = 65 To 66:
For i3 = 65 To 66: For i4 = 65 To 66
For i5 = 65 To 66: For i6 = 65 To 66:
For n = 32 To 126

ActiveSheet.Unprotect Chr(i) & Chr(j) & Chr(k) & _
Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)

If ActiveSheet.ProtectContents = False Then MsgBox "One usable password is " & Chr(i) & Chr(j) & _

Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) 

ActiveWorkbook.Sheets(1).Select Range("a1").FormulaR1C1 = Chr(i) & Chr(j) & _
Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)

Exit Sub

End If

Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next

End Sub Close the VB Editor window. Navigate to the worksheet you want to unprotect.

Hit Tools-Macro-Macros and double-click PasswordBreaker in the list.

Thursday, April 9, 2015

Free Excel / VBA Functions Tutorial Add-ins

Free Excel / VBA Functions Tutorial Add-ins 

By using the most suitable functions in your formulas, you will get the most accurate results possible, plus your Excel models will be easier to maintain and audit.

  • Are you searching for a new function to simplify your formulas ? (Several added in 2013) Are you wondering, if a function is backwards compatible with previous Excel versions ? Are you looking for translated function help (besides English) ? 
  •  Do you want to read about the syntax and usage of an Excel 2013 or VBA function in your native language and practice with a demo workbook ? 

The facts: There are over 600 Excel & VBA functions in Office 2013. Excel functions have been translated in 16 languages. Microsoft offers over 20,000+ function help webpages in 50+ languages. How to navigate fast among so many help pages ? Our free Ribbon Add-in will help you navigate to Microsoft's online help pages with embedded workbooks, which can be downloaded to your computer for function inspection and in-depth practice.

The VBA Add-in is unlocked and requires enabled macros. Read how to enable macros.

The Ribbon Add-in works with Excel 2007, 2010, 2013 (both 32 & 64-bit Office)

License: Creative Commons Attribution-ShareAlike CC-BY-SA (commercial use allowed)

Download it Here