Venn Diagrams in Excel

This post is a testament that readers of this blog are way cooler and enterprising than I am. Justin, who I must say, has some really amazing excel skills, contacted me in April with a VBA Script he made that can draw two circle Venn diagrams in excel. He wrote,

I regularly need to show the intersection between different populations (venn diagrams) and have struggled to find anything useful in XL2000 or XL2003

Most examples are static pictures of circles created in a graphics program to which users add labels – hardly ideal

While still a WIP – I’ve come up with a simple 2 circle venn tool.

It uses drawing objects [msoShapeOval] (nice to get the transparency)

I saw the script and was really impressed by the way it worked. I wrote back to him asking if it is ok to share this with the readers on PHD. And he said OK. Ever since I have been wanting to share this wonderful little tool with all of you.

Without further ado…

Venn Diagrams in Excel

1. First download the Venn diagrams in excel zip file from here [xls version here].

2. Now when you try to open the file, you must enable macros (in excel 2007, you may want to set the security to low and then reopen the file)

3. Click on the big button you see in the first sheet and specify the venn diagram details (how many in each circle, what is the intersection amount)

4. Click the “Draw Venn” button and you have a sparkling venn diagram ready

Once again, I really appreciate Justin for putting together such a nice tool and sharing it will all of us. Thank you

PS: If you like this, do say thank you to Justin in comments. I am sure he can take pretty much any amount of appreciation.

Do you want to be awesome in Excel?

Here is a smart way to become awesome in Excel. Just signup for my Excel newsletter. Every week you will receive an Excel tip, tutorial, template or example delivered to your inbox. What more, as a joining bonus, I am giving away a 25 page eBook containing 95 Excel tips & tricks. Please sign-up below:

@Gerald.. very good point… but how will you control the exact overlap of circles with bubble charts ? Justin’s addin actually calculates how much area of circle1 has to be covered by circle 2 and then places (and sizes) them accordingly.

Chandoo – your’s is a very good point too. My manual solution clearly would need some complicated maths to work out the precise overlaps and position the circles accordingly.
Not impossible, but a bit tricky.
Sorry, I hadn’t appreciated the complexity of the challenge. Oops !

@Gerald… In excel, the bubble charts are much more lamer than we think they are. You cannot really control anything wrt bubble position or size without resorting to some tricks (like placing very small dummy bubbles to control minimum bubble size etc.) On top, the traditional linear way of thinking fails with excel bubbles. I once spent a whole afternoon trying to create something cool with them only to agonize myself with the limitations of bubble charts. But may be that is because I wanst keen enough to explore them completely.

If you come across some positioning logic that would work, please let us know

Chandoo – I’ve kind of set myself a challenge to do this – create a 2 circle solution, which handles the overlap correctly, without VBA. I need to teach myself some maths first – I’ll let you know if I manage it.

Gerald:
The xlVenn spreadsheet has a hidden sheet, creatively named ‘Sheet1′ that has the calculations for the size and relationship for two circles. Might help get you started.
I only stopped (for now) at two circles because I was fascinated in getting it right and spending way too much time investigating a solution (instead of working)

Chandoo and Justin…This is a fantastic post. I am constantly amazed and challenged by Excel. It just so happens there is a project I am working on that this may come in handy for. One thing that would be more useful (if possible) is a sort of zoom control so you could work with small populations. Maybe if you set oval 1 to a default size and then had oval 2 change as a percent of the size of oval 1 you could work with very small and very large ranges.

Chandoo…I have been reading your website for about a year now and cannot express the thanks for the knowledge obtained. I build some pretty complex dashboards at work and the visualization techniques have been very helpful in presenting the information in a meaningful and productive manner. Thanks a million…

This method could well be redundant soon.
J-Walk’s example of a Bubble chart in ‘Excel 2007 Bible’ can be adapted to produce a proportionally correct Venn diagram in a Bubble chart without having to resort to VBA
I’m still playing with it – but will post a workbook example and try my hand at writing up a ‘how to’.
[full credit to J-Walk for both inspiration and concise, easy to use examples]