Dynamic map using Excel and VBA
Web Resources
Web Resources
Web Resources
Web Resources
Web Resources
Web Resources
Web Resources
Web Resources
Web Resources
Web Resources
Web Resources
Web Resources
Web Resources
all posts
-
Conferences
- Terrapinn Corporate Finance World, Sydney – Project finance modelling
- Excellence in oil and gas – Sydney 2009
- Corality’s Liam Bastick discusses presenting at the CPA Management Conference and CPA Congress around Australia
- Summer Drinks in Sydney - You're Invited!
- CPA Australia Congress, Dr. Liam Bastick
- Modelling Risk, Return and Ranking
- Cash Flow Management For Critical Decision Making
- Key Driver Analysis Modelling
- Forecasting Techniques and Financial Modelling
- The ICAA Accounting Conference 2011
- The Newcastle Convention 2011
- National Infrastructure Awards 2011 - The Oscars of Infrastructure
- EuSpRIG: Corality presents SMART financial modelling in London, Greenwich
- Corality presents seminar on Business Analytics and Decision Analysis for the Institute of Chartered Accountants
- CPA Sydney Congress
- Financial modelling for gold projects and flying sharks at The Gold Symposium
- Strong speaker line up at The Gold Symposium, Sydney
- Corality continues its seminars on best practice standards in financial modelling for CPA Australia
- The CFO Crystal Ball: Powerful Financial Modelling for Strategic Planning
-
Corporate News
- Corality is a BRW 2011 Fast Starter
- SMART, Navigator’s best practise modelling methodology is here!
- Corality Gallery Opening - 16th of June, Sydney
- Corality hosts seminar at the London Business School
- Corality Gallery Opening
- Corality clients nominated in the Ernst & Young ‘Entrepreneur of the Year’
- Strategic merger - Corality and Navigator form the Corality Financial Group
- Excel workshops and live model builds with Corality at the CPA Expo
- Mines and Money Conference and Exhibition
- Peter Weatherston: Head of Consulting, financial modelling expert and whisky connoisseur
- Corality Financial Group - the start of a new era
- Banks approve US$138 million for the Wetar copper project
- Corality wins high profile Desertec equity model build job
- Rickard Warnelid – Top 40 business leader under 40
- Corality writes article series about financial modelling for CIMA
- Solar flair – Corality in the press
- Corality sponsors Macquarie University with award for academic excellence
- Investing in iron ore projects – Corality in the press
- Corality’s new MD, Rickard Warnelid
- Corality celebrates rapid growth nomination - BRW 2012 Fast Starter
- Corality attends The Resources and Energy Symposium, Broken Hill
- Corality is building its global presence with an office in Perth
-
Excel
- Corality check-lists in Excel using Webdings
- Are you using the Share Workbook functionality in Excel?
- What level of input Data Validation is needed in Excel?
- Excel lovers celebrate like crazy - Day 40,000 is here!
- ‘Zoom to selection’ with VBA to improve presentation of Excel financial models
- “Input cell reference is not valid” – how to create a Data Table in ANY sheet
- Scenario analysis for freaks - 13 silly options
- Excel and VBA password security
- VBA and Conditional Formatting in Excel
- OFFSET function and tracing formulae
- Financial model review – try this at home!
- IF-fetishism and named-range-bonanza
- Excel forecasting methods and how to assess forecast accuracy
- Full article now published: Reducing Risk in Excel Modelling
- CPA - Excel Secrets and Shortcuts
- Excel 2007 vs. 2010 – What's new
- Spreadsheet skills: hiding formulae
- Worst practice financial modelling
- Spreadsheet skills: Being Sensitive with data tables
- Excel shortcuts – get your Excel shortcuts cheat sheet
- Make Excel history and win a free financial modelling course!
- Corality Excel challenge - Congratulations Daniel Ferry!
- Spreadsheet Errors – Research by Professor Panko
- Sumwise – will it start a spreadsheet revolution?
- Should we use SUMPRODUCT?
- Desktop sharing – Using Skype to get Excel help from your friends
- So what can you do with an Excel spreadsheet
- Your guide to Excel Mapping Software
- Edward Tufte: Information Design and Data Visualisation
- Best practice financial modelling - Dilbert you should try it!
- Three simple ways to improve communication in your financial model
-
Financial model audit
- What is ‘Usual Practice’ for Calculating Project NPV?
- The time zone advantage in financial model audit iterations
- Do you love clients? Join the team.
- Sorry, but your financial model looks like Berlin (before 1989)!
- Can new spreadsheet infrastructure assist financial model audits in real-time?
- 4 Free alternatives to a financial model audit
- What is an ‘iteration’ in a financial model audit?
- Controlling costs in the financial model audit process
- Top 10 tips to reduce errors in excel modelling
- Seasons Greetings
-
Financial modelling industry
- Stand-alone financial modelling can destroy your company
- Charles Darwin, genetics and financial modelling
- www.fimodo.com – New financial modelling website
- 14 steps to improved marketing in your financial model
- You have an ugly baby!
- “I built the worst financial model in the world!”
- Financial model audit analyst - What is the ideal background?
- What is the ideal background of a financial model audit analyst?
- Recruiting two financial modelling analysts in Sydney
- Does the world need pro bono financial modelling?
- My top 3 ‘Cityboy’ moments
- Career booster for senior financial model auditor
- Leighton and CBA win Queensland school PPP Project
- Australia’s fantastic internet infrastructure project
- Operis Analysis Kit (OAK 4.00) – time to upgrade?
- Rock Financial Modelling – Emma McPherson goes independent
- New Member of the Corality Team
- We’re recruiting!
- New Royal Adelaide Hospital PPP Project
- London – New financial model audit specialist in town!
- LinkedIn Group – Financial Modelling in Excel
- Pitfalls of utilising Cloud computing for spreadsheet modelling
- Debt Service Cover Ratio (DSCR) sculpting in Project Finance Modelling - the easy way!
- Regulatory change makes financial planning sector ripe for M&A
-
Training
- Debt-sculpting using VBA and Goal Seek
- Public training courses for financial model auditors?
- Financial modelling training on a shoestring
- Corality Financial Group hosts seminar at the Frankfurt School of Finance & Management
- Business Case Modelling Sydney - 6 & 7 December 2011
- Financial Modelling for Mining Projects training
- Corality training - lunchtime training sessions for PKF Australia
tags
all tutorials
-
Excel - Advanced
- Calculate NPV without Excel formulae
- LOOKUP instead of VLOOKUP and HLOOKUP
- Custom formats in Excel
- Data Validation in Excel
- Goal Seek function in Excel
- Range names in Excel
- Excel Data Tables in any sheet
- An iterative approach to calculating the Internal Rate of Return (IRR)
- How to use SUMPRODUCT
- Custom number formats - Formatting decimals
- Cashflow Available for Debt Service (CFADS)
- Benefits of using Excel shortcuts: get your shortcut sheet
- Cash Sweep Analysis in Project Finance
- Circular Interest – Interest on average balances
- Project Life Cover Ratio
-
Excel - Basic
- Array formulas in Excel
- ICAA Conference: Get Corality’s presentation and excel files
- Excel 2007 Styles Shortcut Tool
- Using trend lines to analyse patterns in historical data
- Excel offset function increases modelling risk
- Custom number formats - Formatting text
- Debt Sculpting to Target DSCR without VBA
- Calculate IRR in Excel
- Debt Service Reserve Account
- Organisational benefits of implementing best practice financial modelling
- Visual Basic for Applications (VBA)
Dynamic map using Excel and VBA
Downloads for this Tutorial:
PDF VersionDownload Now Excel WorkBook
Download Now
Are you a member?
Get full access to our FREE downloads Register Now
Create an intelligent dynamic interactive map using Excel and VBA.
For many, the ability to generate dynamic, interactive maps directly from their Excel spreadsheets has brought valuable dimensions to their analysis and presentation. Dynamic maps allow you to:
- show on a map how data relates/integrates
- map key information/results so it becomes more visual and understandable
Example: Rail links proposal
Suppose there is a proposal to build a new monorail link for a theme park. There are ten (10) proposed new links connecting various locations in the park.

Screenshot 1: Map of theme park and proposed links
Setting up a dynamic map in Excel
How to map those rail links in the map as shown in Screenshot 1 to make those proposed links more understandable? More importantly how to set up a dynamic map, e.g. let’s say links 8 to 10 are not included then the links will be invisible?
Step 1: Map the links
Map Links 1 to 10 in the map. This can be done by firstly activating drawing toolbar in your Excel spreadsheet: View -> Toolbar -> Drawing
Screenshot 2: Drawing toolbar in Excel
Then click AutoShapes „³ Lines, you can then start mapping the lines using a straight line, curve or freeform. Screenshot 1 illustrates the example of the mapped links.
Step 2: Name the link
Name each link, i.e. Link 1 to Link 10 by clicking the respective line and typing in the name box which is located in the upper left of the formula box. For example the link from Fantasyland to Frontierland in the screenshot below was named Link 5.
Screenshot 3: Name each links
Step 3: Create a link switch
Create a link switch to enable the user to include or exclude certain links. In this example we custom format the switch as binary (1, 0) with 1 = “Included” and 0 = “Excluded”. Data validation of 1, 0 is then used for each switch. If you would like to learn more about custom formats similar to this switch and data validation, refer to our other tutorials.
Step 4: Create range names
Create range name for the Links Switch (Column F) as well as for the Links (Column B). For example the links switch is named LinksSwitch and the Links are named Links.
Screenshot 4: Create range name
VBA code for dynamic map
Press Alt+F11 to open the Microsoft VB editor in Excel and create a new module. Refer to Screenshot 5 for the code. The bullet points below set out the logic of the VBA macro
- The macro loops through the set-up range and activates/hides the links
- The macro should be run every time the link has been activated or de-activated
- The first part of the macro is to set-up the variables, i.e. Links and LinksSwitch
- The next part is to set the loop over the Links, i.e. Link 1 to 10 (i = 1 to 10)
- If the link is included (=1), then the link will be displayed. In this example, refer to sub-macro called DisplayLink which sets the included links to be displayed in red
- If the link is excluded (=0), then hide the link. In this example, refer to sub-macro called HideLink which sets the excluded links to be displayed in grey.
The last step would be to create the button for the macro and assign the macro to it. For instance, how the map in Screenshot 1 will change if Links 8 to 10 (in the middle of the theme park) are excluded? All you need to do is to turn off the link switch and hit the macro button. The result is shown in Screenshot 6...
Sub LinksMap()
Dim ActiveLink As String
Dim i As Integer
Dim rngLinks As Object
Dim rngLinksSwitch As Object
Set rngLinks = Range("Links")
Set rngLinksSwitch = Range("LinksSwitch")
'Loop over all Links in the set-up range. This could be improved by using a For Each statement.
For i = 1 To 10
'pick up the name of the active link
ActiveLink = rngLinks(i).Value
'Only run the test if the links has a name
If ActiveLink <> "" Then
'If the Link is "on" (=1) then apply 'bring it to front' to the 'on'-link
If rngLinksSwitch(i) = 1 Then
Call DisplayLink(ActiveLink)
Else
'Bring the 'off'-link to front
Call HideLink(ActiveLink)
End If
End If
Next i
ActiveSheet.Shapes("Map").Select
End Sub
Sub DisplayLink(LinkName As String)
ActiveSheet.Shapes("Link " & LinkName).Select
Selection.ShapeRange.Line.ForeColor.SchemeColor = 10
End Sub
Sub HideLink(LinkName As String)
ActiveSheet.Shapes("Link " & LinkName).Select
Selection.ShapeRange.Line.ForeColor.SchemeColor = 23
End Sub
You can see that the red lines in the middle of the park are now hidden (turned to grey).
Screenshot 6: Dynamic map with the included links
Not a member?
Register now to get full access to our FREE Tutorials and workbooks.
Register Now
Login
Downloads for this Tutorial:
PDF VersionDownload Now Excel WorkBook
Download Now
Are you a member?
Get full access to our FREE downloads Register Now
COMMENTS
Upcoming Courses
Testimonials
"Oxiana's major driver in selecting Corality was time and expertise. They went to extraordinary lengths in order to deliver on time, and their track record made them the most appealing candidate. Corality helped to facilitate efficient and effective communication between Oxiana,their advisers and the banks, which was a huge bonus."
Ben Stockdale, Ex-Treasurer




Post new comment