Brought to popular attention by Enkvist at McKinsey & Company, marginal abatement cost curves (MACCs or MAC curves) are a way of showing both the cost of saving carbon, and also the size of the potential saving from that source. I’ve mentioned them before in a post about low hanging fruit offered by refurbishment.

They are usually used at a policy assessment level, looking at the average cost of carbon saving within a country or a region, but I find them equally useful for showing the options for a particular building, or across a range of a few buildings.

A MAC curve is similar to a column chart, only with variable widths for the columns. Since there is no way of changing the width of each column in an Excel column chart, we have to try something else. I don’t remember where I first found a way of doing this in Excel (possibly the Carbon Trust), but I’ve had a MAC curve spreadsheet in my arsenal for some time now. The annoying thing was setting it up to handle varying numbers of measures so I decided it was time to automate it a little bit.

The MACC Generator workbook here is all set up for you to use straight out the box, but I’ve posted the code here too so you can see what you’re getting.

The nicest thing about the code here is that after years of frustration working with arrays in VBA, I finally came across a way of slicing arrays. Most programming languages have a simple way of doing this, particularly the Matlab type ones but Excel VBA is lacking in that department. Luckily Excel itself isn’t, so we can package up the worksheet function INDEX() in our own pair of functions SliceRow() and SliceCol() and away we go.

As ever, don’t be afraid to ask questions in the comments. And feel free to get in touch via if you’d like something developed a bit further based on this tool or anything else you see on the site for that matter.

Jamie Bull |

Related Posts

WiGLE is a popular platform which can be used for finding the location of a device using the names of WiFi networks in its vicinity. I’ve written about this before, and wrote some Python code to interact with their API. This API has since been retired and replaced with a new one, as of December […]

Just a quick post to point out a couple of really useful tools.The first is a web-based tool for finding weather files for a location of interest. It’s similar to the Excel EPW finder tool we created a few years back, but much more modern looking. It is however missing a few of the useful […]

Eppy is a really useful library which I’ve written about several times, since before I really had anything to offer in terms of contributing code. Over the past year or so though, I’ve started to contribute back some of the changes and additions I’ve made while using eppy on academic and commercial projects.This post is […]

Leave a Reply

Your email address will not be published. Required fields are marked *