Author Archive
Modelling Inventory Run Rate & Cash Flows using Excel
![Modelling Inventory Run Rate & Cash Flows using Excel](https://chandoo.org/wp/wp-content/uploads/2017/04/cashflow-vis-model-3.gif)
Imagine you run an office furniture company. You want to stop reordering two brands of furniture – Relaxer (a type of chair) and Boca Top (a type of table). You currently have 20,000 Relaxer chairs and 5,000 Boca Tops. These are valued at $200,000 and $100,000 respectively. When sold, they will yield $100,000 and $25,000 gross profit. You are hoping to sell them off in 2 or 3 years. You forecast that we can sell off these as per some yearly schedule.
You need to analyze this and prepare a cash flow model.
Let’s learn how to answer such open ended questions using various analysis techniques in Excel.
Continue »There are 5 hidden cells in this workbook – Find them all [Excel Easter Eggs]
![There are 5 hidden cells in this workbook – Find them all [Excel Easter Eggs]](https://chandoo.org/wp/wp-content/uploads/2017/04/easter-egg-excel-2017.png)
It is Easter time, and that means time for another fun Easter Egg hunt in the spreadsheet. For the last 8 years (since 2009), I have been running Easter Egg hunt at Chandoo.org. This year too, I have prepared an exciting egg extraction enigma for you. Check it out.
Can you find all the 5 hidden cells in this workbook?
First step. Download this workbook. There are five worksheets, each containing one egg. You need to find the hidden cell in each worksheet.
Continue »How many employees are on leave during Easter holidays [Homework]
![How many employees are on leave during Easter holidays [Homework]](https://chandoo.org/wp/wp-content/uploads/2017/04/easter-leaves-problem.png)
Easter is around the corner. After what seemed like weeks of lousy weather, finally the sun shone today. I capitalized on the day by skipping work, walking kids to school, taking Jo out for some shopping, enjoying a leisurely walk / cycling with Nishanth in the park and almost forgetting about the blog. But it is dark now and before tucking the kids in, let me post a short but interesting home work problem.
Let’s say you are HR manager at Egg Co. and you are looking at the vacation plans of your team.
Easter is your busiest time and it would be a bummer if a majority of your staff are on leave during the Easter season (14th of April to 28th of April, 2017). So you want to know how many people are on leave. A snapshot of your data (table name: lvs) is shown above.
Click here to download the sample file.
You want to answer below three questions:
- How many employees are on leave during Easter holidays (14th of April to 28th of April)?
- How many employees are on approved vacation during Easter holidays?
- How many employees in “Team ninja” are on approved leave during Easter holidays? Assume team employee numbers are in named range ninja
Hide columns one one tab same way as they were in another place [quick tip]
![Hide columns one one tab same way as they were in another place [quick tip]](https://chandoo.org/wp/wp-content/uploads/2017/04/hide-columns-quickly.gif)
One of the regular reporting tasks I do involves a manual step I hated. It goes like this:
- Dump several columns of data in the template file.
- Hide a particular set of columns (these are not together, so must be done one at a time or with CTRL+selection)
- Save and publish the file.
After doing this manually for last few fortnights, today I wanted to automate the column hide process. I was about to write a VBA macro to clone the hide settings from one workbook to another. But then I thought, may be paste special can be of use.
And what do you know. It does exactly that.
Continue »Sand Pendulums – Lissajous Patterns in Excel
![Sand Pendulums – Lissajous Patterns in Excel](https://chandoo.org/wp/wp-content/uploads/2017/04/sand-pendulums-excel-demo.gif)
Few days ago, I saw a beautiful homemade science experiment on Sand Pendulums on Bruce Yeany‘s YouTube channel. Go ahead and check it out. It is a cool project to do with your kids.
I will try this experiment with kids during school term holidays around Easter. But first, I wanted to try the simulation in Excel.
Simulating sand pendulum pattern in Excel
Take a look at the final simulation above. This is what we will create in Excel.
Continue »Reshaping your data easily – Case study [Pivot tables FTW]
![Reshaping your data easily – Case study [Pivot tables FTW]](https://chandoo.org/wp/wp-content/uploads/2017/03/show-me-your-nose.jpg)
Late. Jayaram, my uncle is also a teacher. When I was a kid, I used to spend a lot of time with him, learning all sorts of things. He taught me chess, maths and so many life lessons. I remember one such lesson very vividly. One day, he asked me to do something. I did it in a very long way. After seeing me struggle for several minutes, he chipped in and showed me how to do it easily. He then said, “when someone asks you where your nose is, you don’t twist arm around your head. You just point to your nose directly.”
The idea is that when you have a direct, simple way to do something, you should use it.
Nose and pivot tables… how are they connected?
We are coming to the point. Read on for full case study and solution.
Continue »Figuring out Employee Churn with Power Query [HR Analytics]
![Figuring out Employee Churn with Power Query [HR Analytics]](https://chandoo.org/wp/wp-content/uploads/2017/03/employee-churn-analysis-pq.png)
Let’s say you are the people manager at ACME Inc. You are looking staff list for the months – January and February 2017. You see that we had 4,000 employees in Jan and 4,200 employees in Feb. So what is the churn?
- Is it just 200?
- Or is it the sum of people who left and who joined?
- What if you want to find out how many people moved to new designations / departments or groups?
You see, churn is tricky to figure out.
So why not invite the pros? ie Power Query.
Continue »Kill NULLs – a Simple macro to save time when importing data from SQL Server
![Kill NULLs – a Simple macro to save time when importing data from SQL Server](https://chandoo.org/wp/wp-content/uploads/2017/03/SNAG-0077.png)
As part of a my ongoing consulting gig, I often run painfully long queries on SQL Server to fetch data. This data obviously ends up in Excel for further analysis. Now, some of these queries return NULL values in several columns (did I tell you that the queries have a gazillion left joins on them, oh yeah, they do). Although technically NULL is nothing, when you import this data to Excel, we get the text value NULL in the cells. And I don’t need these NULL values messing up all the calculations and pivots.
Of course, we can go ahead and use the isnull() SQL function to deal with them at the query level. But since the queries have 100s of columns and used by various teams for different purposes, changing them causes a lot of pain. So I did what any sensible Excel user would do. Just kill those NULLs mercilessly once they are in Excel.
Continue »![Lookup most frequent item [Homework]](https://chandoo.org/wp/wp-content/uploads/2017/02/most-frequent-lookup.png)
Here is an interesting problem to keep your brain cells fight boredom on this Friday & weekend.
Let’s say you have some data like above.
And you want to know, for a given customer name (in cell G4),
- What is the most frequent quantity?
- What is the most often purchased item?
How would you write formulas to get these answers?
Continue »Use CTRL to make copies of worksheets quickly
![Use CTRL to make copies of worksheets quickly](https://chandoo.org/wp/wp-content/uploads/2017/02/copy-worksheets-quickly.gif)
The other day, I found myself making copies of a templated report worksheet. After trying the usual route of “right click on source sheet, select move or copy, check create a copy and press OK” a few times, I thought “well that is asinine.” So I figured, may be CTRL+Drag will create a copy. And what do you know, it does.
So that is our quick tip for the day. Whenever you need to make a copy of something, simply hold CTRL key and drag the thing.
It works for charts, drawing shapes, worksheets and even ranges.
Continue »![Find them and Extract them – VBA Macro](https://chandoo.org/wp/wp-content/uploads/2017/02/find-and-extract-smith-v4.gif)
I started a new consulting gig with NZ Ministry of Business (aside: when I told my daughter about this, she widened her eyes and said ministry of MAGIC!!! ). On my first day, while having lunch in breakout area, I chatted with the gentleman sitting opposite me. We got talking about this and that and eventually the topic turned to What I do at MB. So I told him that I am helping the HR with some data analysis and reporting using Excel & SQL Server. He asks me, “So you must be familiar with Excel object model”. I said, “oh, why yes”. He then asks me, “I have this problem that is bothering me for years. You see, I get a lot of data. And I use Find (Ctrl+F) to find all the cells that contain certain code. But the results are all over the place. I want to know how to extract all the finds to a target worksheet – value & address format.”
I explained him how to do this while chewing mouthfuls of rice & veggies.
But once I am home, I thought, “hey, maybe there are others out in the world who want to do this”.
So here we go.
Continue »![Designing awesome financial metrics dashboard [tutorial]](https://img.chandoo.org/contests/mv2016/rs/09-chandeep-c.png)
In this amazing guest post, the winner of our 2016 dashboard contest – Chandeep – Explains how he constructed the jaw dropping beauty (shown above) using Excel, creativity, love and sweat. Grab a full cup of coffee (or whatever liquid fancies you) and read on. Take lots of notes and play with the ideas in Excel while reading to maximize your learning.
Thanks Chandeep.
Continue »![Road Trip Planner Template [Excel Downloads]](https://chandoo.org/wp/wp-content/uploads/2017/01/mt-ruapehu-and-ngauruhoe.jpg)
We recently went on a road trip around parts of New Zealand’s north island. We have been to Taupo, Rotorua, East Cape and Napier. It took us 2 weeks, we drove more than 2,000 km and spent almost NZ $3,000 on the trip. Of course, being a data nerd, I made a plan of the trip in Excel and that helped us budget for this.
After getting back to home, I thought it would be fun to polish the planner workbook and share it with you all so you too can plan a fabulous road trip. So here we go.
Continue »Get rid of that ugly formatting with two simple tricks
![Get rid of that ugly formatting with two simple tricks](https://chandoo.org/wp/wp-content/uploads/2017/01/clear-formats-excel-demo.gif)
We are on a tiki tour around NZ. So far we have been to Taupo & Rotorua. And we are doing what you do when you are on a holiday – being lazy, going on walks, swimming in lakes, eating copious amounts of food and getting lost. Of course, all this means, I have very little time to access to internet & my blog. So the updates will be slow for next two weeks. Here is a quick tip (well, two of them) to keep you busy and awesome.
How to remove ugly formatting from your workbooks?
Do you have a colleague or boss (shudder) that loves to apply their special touches to every workbook their mouse lands on? Do you constantly wince and whine when you have to work on that spreadsheet.
Here are two handy ways to restore your data to its original glory.
Clear formats:
Simple, select the data you want formatting gone from, go to Home > Clear > Formats.
And Excel will weave an expelliformat spell at your data and make it clean.
Here is a quick demo.
Continue »Check for two out of three conditions (Homework)
![Check for two out of three conditions (Homework)](https://chandoo.org/wp/wp-content/uploads/2017/01/two-out-of-three-logic.png)
Time for some logic check.
Suppose, you have three logic values in A1:C1 (TRUE or FALSE values in each cell)
You need to find out if ONLY two of these values are TRUE.
How would you write the formula?
Got an answer? Awesome. Just post your formula in the comments. Let’s see how much variety we can get from all of our readers.
Continue »