How to calculate growth (%) percentage: WoW,YoY,MoM,QoQ and others

 Any report or dashboard is not complete if you are not showing the difference. For that matter, anything life doesn't make sense if there is no difference over time. Or even if there is a difference if you are not showing or presenting them.


Now what is the difference? 

Its a comparison between the current state versus "something". The "something" may be future or past. In business terms the interest is in comparing current week versus previous week, month over month, quarterly, half-yearly, yearly growth in terms of percentages.

How do we calculate the growth percentage. Its a simple formula, let me explain in generic terms.

The growth percentage between two period is calculated 

Current period divided by previous period minus 1

Remember this is as easy as it gets and there are no brackets involved here.






VBA Script: How to split data into different sheets based on a value in a column

Update 2025: If you are looking for the best hardware to handle this kind of analysis, check out my new guide on the Top 5 Tools Every Data Analyst Needs

Lets say you a 10000 row data dump which has atleast 30 types of unique values in a column. Now your task it to split this data into multiple sheets with these sheets being named based on the unique value.

Doing this task manually would take atleast 30 mins and is prone to human error.

So how do we do this using a macro. Here are the steps based on a hypothetical data.

Our data is below. For this exercise prepare something similar on your Excel. 




Now hit Alt+F11 and click on create new module as shown below.

Once you have created new module. On the right hand white space you would need to enter the below VBA code. I will explain you on each line so that you are not simply copy pasting but you know what you are doing.







VBA code:

Sub filter()
Application.ScreenUpdating = False
Dim x As Range
Dim rng As Range
Dim last As Long
Dim sht As String

'specify sheet name in which the data is stored which needs to be split
sht = "Macro 2"

'choose the filter column in the following code
last = Sheets(sht).Cells(Rows.Count, "B").End(xlUp).Row
Set rng = Sheets(sht).Range("B1:I" & last)

'N1 is the column where the code temporarily stores unique values of  the "to-be-split" 'column from previous step, so specify a empty column 
Sheets(sht).Range("B1:B" & last).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range("N1"), Unique:=True

For Each x In Range([N2], Cells(Rows.Count, "N").End(xlUp))
With rng
.AutoFilter
.AutoFilter Field:=1, Criteria1:=x.Value
.SpecialCells(xlCellTypeVisible).Copy

Sheets.Add(After:=Sheets(Sheets.Count)).Name = x.Value
ActiveSheet.Paste
End With
Next x

' Turn off filter
Sheets(sht).AutoFilterMode = False

With Application
.CutCopyMode = False
.ScreenUpdating = True
End With

End Sub

Once you have entered the above code. You can have a button/object linked with this code so that evey time you click the data is split based on the specified column into multiple sheets and with name of the sheet as per the unique value used to split.

If you need a copy of the excel file readymade, please email me at askme.kkhelps@gmail.com

Hope this helps! 

How to achieve inner peace in chaos: Work from Home drama

Its chaotic, really chaotic when you are working from home and yes when you have a pandemic to add to the recipe its like adding salt on the wound. AND the last straw is if you have kids who are aged between 0 to 4 years old. 

I bet life is a CIRCUS with the above configuration in you life's circuit. Consider this:

  1. You have a zoom meeting.
  2. Your kid has done poop.
  3. Your spouse is busy in the kitchen dealing with the critical phase of her cooking (which if disturbed will leave you hungry for the rest of the day).
  4. Your parents are not in a position to help.
  5. AND to add the icing on the cake there is a relative who is arriving in 30 mins.

Ok how do I deal with this now? There is no alternative and no respite.

F**K you just cant ignore any of the above situations. After cursing yourself for a moment. You will have to put off your video on Zoom, get to your messy kid first with your headphones ON like a astronaut. Carefully maneuver through the stuff when on mute in Zoom.

Once your kid is glittery clean and dressed up. Clean the shit, throw the shit, clean your hands and all through this hope you are not asked to present anything on the Zoom call.

As soon as you give a sign "Yes, I accomplished". There comes another task from your spouse to go to the nearest provision store and get few important items needed to prepare "extravagant feast" (which you will never get for life) for the in the incoming souls-from-hell aka. guests.

How do you find some "me-time" or rather some inner peace? A MILLION DOLLAR QUESTION

Every moment you feel like what-if the offices re-open and my boss calls me to office RITE-THIS-MOMENT? but no that never happens.

Firstly, stop cursing yourself. sink in the experiences you just went through. To give deeper thoughts to what is happening at this moment. You may hate few people, you may feel like killing self. But no you are not supposed to do that. Instead, find opportunities of peace. While walking to the provision store you have me-time, utilize it!


Me-time need not be in hours. It comes in a very tiny bits since the pandemic hit us!! When I say tiny-bits its in minutes!!! Organize yourself in these tiny moments of bliss to enhance your mood. No point in taking out your frustration at family or colleagues. Use this frustration to fuel your vehicle to reach life goals, be it personal or professional.

Just by doing this simple routine in your mind for few instances. You have began the process of re-wiring you brain to be less unhappy and more organized.

Stay tuned! More to come in Work home Home mental health series

How to show a value in Millions in Excel

Update 2025: If you are looking for the best hardware to handle this kind of analysis, check out my new guide on the Top 5 Tools Every Data Analyst Needs

 In Excel, when are designing a dashboard with big figures like  number which runs into Millions. Its not a good idea to show all the digits in the cell as this might make the dashboard look very busy and doesn't make any sense to the executives who would review it.


In these cases you can use the "Custom" Format to mask the value into showing in millions. As shown above enter "#0.0,, "M" without quotes and the value will be shown in Millions. Observe the formula bar the value is not modified but the way it is represented is masked in the cell. 

How to retrieve an Excel file crashed due to System Shut down

Update 2025: If you are looking for the best hardware to handle this kind of analysis, check out my new guide on the Top 5 Tools Every Data Analyst Needs

 If you are in a situation where your computer suddenly switched off and the Excel file you were working on got closed without saving.

Now for the below method to work your need to have "Auto Save" feature turned on in Microsoft Excel 

To check if Auto Save is turned on follow the below path in your Excel

File-->Options-->Save, now on the right hand side tick the "Save AutoRecover information every X minutes and also tick the "Keep the last autosaved version if I close without saving" option.

Now whenever you excel crashes, the most recent version which was autosaved despite you not saving it will be available when you open a blank excel workbook.

If you want see other versions of the crashed workbooks which are not saved. follow below path.

File-->Open-->Scroll till bottom and click on "Recover Unsaved Workbooks"