This is a guest post by Yogesh, a chartered accountant and excel blogger.
With this post we are starting a new series on how to do basic accounting in Microsoft Excel.
In this and next 5 posts, we will aim to setup Profit & Loss account reporting for multi-location retail company.
During this series we will learn how to make P&L reports on various criteria with just few clicks.
Many users find it difficult to manage their P&L reporting for Multi Location organization.
We will be using Pivot Tables for our reporting purpose and will take example of a Retails chain with multiple locations divided into various regions. It is recommended that you be familiar with the concept of pivot tables and also familiar with basic accounting terms.
Topics covered in this series:
Data sheet structure for Preparing P&L using Pivot Tables
Preparing Pivot Table P&L using Data sheet
Adding Calculated Fields to Pivot Table P&L
Exploring Pivot Table P&L Reports
Quarterly and Half yearly Profit Loss Reports in Excel
Budget V/s Actual Profit Loss Report using Pivot Tables
Do not think that series is not only about the Profit and Loss Account. This is also about Pivot Tables. We will cover many Pivot Table tricks during our series. I hope you will be able to use those tricks elsewhere too.
Data sheet structure for Preparing P&L using Pivot Tables
Data is most important part of the entire reporting requirements. You should plan your reporting needs in advance and collect data accordingly. Initial investments in organizing data properly will help you in long run for your reporting requirements.
Data needs to be in table format on separate sheet. First row of the data should be table headers and following rows to contain the data.

You need to have all the possible dimensions in your data. This will help you to quickly change your P&L report on different dimensions.
A dimension is defined as “…a data element that categorizes each item in a data set into non-overlapping regions” according to Wikipedia.
The above data structure will give us flexibility to prepare P&L report by,
- Geography-wise
- State-wise
- City-wise
- Store-wise
- Month-wise – This can be further grouped on Quarterly / Six Monthly / Yearly reporting
Calendar related data points should be entered as date. You can see that the month column in the data is showing Jan.2009 but it is actually entered as date January 31, 2009 then formatted as MMM.YYYY
This gives you flexibility to group data by quarterly / Six Monthly / Yearly for reporting. [learn more about grouping dates in pivot reports]
It is advisable to have it as last date of the month; this gives you further flexibility to do calculations based on number of days during the month.
There is no need to have calculated data in your data table, you may notice that I do not have calculated figures in the data sheet. Data points like Gross Margins, Margin % , Operating Profit and Operating Profit % will be calculated in Pivot Table using calculated field option.
During this series we will cover how to make P&L report on these dimensions using sample data. You can download sample data for practice along with our posts.
Download this Data:
Click here to download this data file in .xls format. We will use this data in next part to prepare our initial pivot table.
This data is prepared using RANDBETWEEN function of Excel for usage in this series.
What Next?
In the next part of this series, learn how to make a pivot table for Profit Loss Reporting using this data.
Added by PHD:
- I know as much about accounting as a cow knows about pie charts. So I asked Yogesh, a CA with vast experience and passion for excel, to write for us. I am very thankful to him for accepting this offer and sharing his knowledge.
- Please share your feedback and ideas for this series using comments. Yogesh and I will reply to your questions. Also, say thanks if you like the idea and want to learn more.
- Sign-up for PHD E-mail newsletter so that you don’t miss any new posts
Yogesh is an accountant with 13 years of experience in India and abroad. His specialties are budgeting and costing, supplier accounting, negotiation of contracts, cost benefit analysis, MIS reporting, employees accounting. He writes about excel at http://www.yogeshguptaonline.com/














17 Responses to “Custom Number Formats – Colors”
You are right, Chandoo. I was playing with the colour numbers last week and some of them don't appear different from each other. Others are totally different from yours.
@Duncan
Each version of Excel, post 2003, renders colors slightly differently
Different language versions may also have different default color palettes
Hello in french
excel 2010
colo1 = couleur1 = black
[couleur1]; [couleur2]; etc..
@Hui, thank you very much again for this great post.
However - under Excel 2007, Hungarian version your solution does not work with color names. I've tried both English and Hungarian names, but drops an error message "not valid formats"
Do you have any idea how to solve this issue?
thanks in advance
@Andras
Without a Hungarian version of Excel 2003 I don't think I can assist
Have you tried using the colour numbers? I couldn't get the names to work (despite using an english version of excel). but it did work with the numbers though. I left out the "u" and was easily able to produce burgundy using [color9]
Here a possible solution: find an English version of Excel, write there the formats using English names, then open the file in the Hungarian version and see the translation.
In Excel 2007 I can't get the colour names to work e.g Sea Green but the numbers do e.g color3 - colour3 does not work so I must bow to the country that has stolen my language (ha ha!)
Hey chandoo, nice Tip!
Wouldn't be easier just apply some conditional formatting for negative numbers and another for positive numbers? Or there's some cases that you can't do that?
Unfortunately the TEXT function doesn't color the cell as number formatting does.
Hi Hui,
Great post Sir, love the new way of formatting with color numbers.
I am using 2007, and it leads me to the last color number 56.
Thanks Hui.
[…] explains how to set up custom number formats with a wide array of […]
Thanks Hui - works a treat!
Thank you, very helpful.
Trying to figure out if it is possible to apply color only to a part of the cell?
E.g. I have a value formatted as Accounting with a currency symbol.
Those I find somewhat distracting though necessary. If I could make them less obtrusive by coloring them gray while the number would stay black, that would be great. Tried tinkering with the format string, but didn't get the desired result. Single color for complete cell value works, but coloring just part of it could not be achieved. Maybe somebody managed that?
Exactly what I was looking for - thank you!
colour in the Australian doesn't work - we have to go American and no problem.
I always thought is was 56 colours notice you have 57. Cool.
thanks
Analir Pisani
Customised Microsoft Office Training Specialist
Sydney - Australia
http://www.azsolutions.com.au
Thank You!