Dummy Data – How to use the Random Functions
Using collected or known data is the best when developing Excel models, but from time to time this may not be available when you are developing your model.
This post will look at some options for setting up Dummy Data using Excels Random functions.
Variability
Real data displays a range of variability, but this variability is generally within ranges or distributions of ranges of results.
All fields type can contain variability
ie: Country, State Names and Zip/Postal Codes, Maybe large lists but are fixed
Peoples Names, Maybe a large lists but are fixed by local rules
Ages, generally less than 80, never less than 0
Dates: Rarely before 1990 or 1900 in rare cases
Lists: are fixed
Numbers: generally random or conforming to a fixed distribution or known trend
Numbers: may include integers, decimals, negatives, extremely large numbers or all combinations
In generating random lists you will need to choose if you want random data, random data within constraints or random with a distribution. The choice is really yours and should in part be based on what the data is being used for and how accurately it needs to reflect reality.
Techniques
The techniques described below are all shown with a worked example in the attached Examples File or the Excel 2003 Example
Each example is annotated below like (Example 4.). ie: Refer to Example 4 in the above example files.
Dates
Setting up Random Dates is a simple process using the Date function.
=Randbetween(StartDate,EndDate)
Dates in a Range of Years
=Randbetween(Date(2000,1,1),Date(2011,12,31))
Will give a list of Random dates between 1 Jan 2000 and 31 Dec 2011 (Example 1.)
(Thanx Mike W)
Dates in a Month
=Date(2010, 6, Randbetween(1,30)
Will give a list of Random dates between 1 June 2010 and 30 June 2010 (Example 2.)
Don’t worry that the above formula (Example 1) can actually produce a 31 Feb 2005, the Date function will happily convert that to 3 March 2005 (Example 3.)
Dates within a Date Distribution
=DATE(2011,7,NORMINV(RAND(), 0,60))
Will give a list of Random dates between approximately 1 Jan 2010 and 31 Dec 2010, with a mean of July 1 and standard deviation of 2 Months (60days) (Example 4.)
Where NORMINV(RAND(), 0,60) will return values between -180 and +180, 99.7% of the time
Text Fields
Dependant on how many items in the list you require there are 3 techniques available
Choose
For small lists of less than 6 to 10 items you can use a simple Choose function (Example 5.)
=Choose(Randbetween(1,6),”Item 1″, “Item 2”, “Item 3”, “Item 4”, “Item 5”, “Item 6”)
VLookup
Using VLookup (Example 6.)
=Vlookup(Randbetween(1,List Length), List, 2)
Index
Using Index (Example 7.)
=Index(List, Randbetween(1, Counta(List) ))
Numbers
Small Random List of Numbers
Random from a small list of numbers (Example 8.)
=Choose(Randbetween(1,6), Numb 1, Numb 2, Numb 3, Numb 4, Numb 5, Numb 6 )
Note that the numbers:
- Don’t have to be in any order,
- Can be integers, negatives or contain decimals
- Can be repeated
eg: =Choose(Randbetween(1,6), 18, 21, -19, 36.4, 18, 24)
Random Integers
Return Integers between Start and Finish (Example 9.)
=Randbetween(Start, Finish)
=Randbetween(50, 100)
Will return an Integer between 50 and 100
Random Numbers
=Rand()
Will return a random number between 0 and 1
=Round(Rand()*100, 2)
Will Return Numbers between 0 and 100 with 2 Decimal places (Example 10.)
Random Numbers Based on a Distribution
=Norminv(Rand(), Mean, SD)
Will return a random number between 0 and 1 based on a distribution of Average = Mean and Standard Deviation = SD
=Norminv(Rand(), 50, 17)
Will return a random number between 0 and 100 based on a distribution of Average = 50 and Standard Deviation = 17, (Example 11.)
Random Numbers Fitting a Trend
If your distribution has to match a trend add a Random component to the Trends equation (Example 12.)
Y=mX+c
= rand() * X + rand()*5
= rand() * A2 + rand()*5
True/False
Choose
Use Choose and Randbetween (Example 13.)
=Choose(Randbetween(1,2), True, False)
If
Use If and Rand (Example 14.)
=If(Rand()<0.5, True, False)
Combination Text and Numbers
The above techniques can be combined to make lists of Alpha Numeric Data
Say your business has a fleet of vehicles (TR=Truck, VN=Van, CAR=Car)
=Choose(Randbetween(1,3),”TR”,”VN”,”CAR”) & Text(Randbetween(1,15),”0#”)
Will randomly choose 1 of “TR”,”VN”,”CAR” and add a random number between 1 and 15 to it format with a leading 0, eg: TR05, (Example 15.)
Other Sources of Data
Random Data
There are a number of web sites where Random Data is available.
http://www.fakenamegenerator.com/order.php
http://www.generatedata.com/#generator
http://www.melissadata.com/lookups/
Open Source Data
There are a number of web sites where Open Source Data is available.
http://www.readwriteweb.com/archives/where_to_find_open_data_on_the.php
Function Used:
Rand: Returns a random number between 0 and 1.
Randbetween: Returns a random Integer between lower and upper limits. Pre Excel 2007 Randbetween was only available through installation of the Analysis Toolpak (Thanx Luke).
Norminv: Returns the inverse of the normal cumulative distribution. That is it returns the X value from a Normal Distribution that has a know Mean and Standard Deviation where the a known cumulative percentage is supplied.
Choose: Choose an item from a list of up to 254 items.
Vlookup: Lookup the matching value from a list and return a data item from another column from the same location.
Index: Retrieve an items from a defined location within a range.
Text: Displays a number as Text with a defined format.
Other Uses of Random Functions
Of course the techniques shown here don’t have to be used for setting up Dummy Data.
One area where Random numbers is used is in Monte Carlo Simulation. This has been discussed at Chandoo.org at Data Tables and Monte-Carlo Simulations in Excel a Comprehensive Guide
Techniques
The techniques described above are all shown with a worked example in the attached Examples File or the Examples File 2003 ver
Limitations in Pre Excel 2007 versions
The Excel function, Randbetween, was only introduced in Excel 2007. As such the exaples above will only work in 2007/10.
However a simple alternative is available
Randbetween(Low, High) = Low + Int(Rand()*(High-Low))+1
Randbetween(90, 100) = 90 + Int(Rand()*10)+1
Examples using this approach are shown in the 2003 Version of the Examples files above.
How have you made Dummy Data or used the Random Functions?
How have you made Dummy Data or How have you used it ?
How have you used Random Numbers in your workbooks ?
Let us know in the comments below:

















31 Responses to “Beautiful Budget vs. Actual chart to make your boss love you”
Would be considerably easier just to have a table with the variance shown.
On Step 3, how do you "Add budget and actual values to the chart again"?
There are a few ways to do it.
Easy:
1) Copy just the numbers from both columns (Select, CTRL+C)
2) Select the chart and hit CTRL+V to paste. This adds them to chart.
Traditional:
1) Right click on chart and go to "select data..."
2) From the dialog, click on "Add" button and add one series at a time.
One more way to accomplish it is just select the columns into chart. Press Ctrl+C and then press Ctrl+V
Regards
Neeraj Kumar Agarwal
Unfortunately, this doesn't seem to work for me in Excel 2010. The "Var 1" and "Var 2" columns cannot combine two fonts to display the symbol and the figure side-by-side.
Secondly, there is no option to Click on “Value from cells” option when formatting the label options. The only options provided are Series Name, Category Name or Value.
@TheQ47... the emoji font also has normal English letters, so if you use that font, then you should be ok. I am assuming your computer doesn't have that font or hasn't been upgraded for emoji support.
Reg. Excel 2010, you can manually link each label to a cell value. Just select one label at a time (click on labels, wait a second, click on an individual label) and press = and link it to the label var 1 or var 2.
I am using excel 2010, please explain how to apply Step 12
Regards
Neeraj Kumar Agarwal
Hi Neeraj,
"Value from cells" option is only available in Excel 2013 or above. In older versions, you have to manually adjust the label value by linking each label seperately.
Read this please: https://chandoo.org/wp/change-data-labels-in-charts/
Sir, you are just awesome.
Your creativity has no limit.
Regards
Neeraj Kumar Agarwal
Hi Chandoo,
I just found your website, and really love it. It helps me a lot to be an Excel expert 😉
Currently I am facing with a problem at step 11:
Var1 Var2
D30%
A5%
B0%
B4%
B7%
C10%
C13%
D27%
I42%
Though at mapping table, I used windings, here formula uses calibra. How I can change it? I am able to change only the whole cell. In this case numbers will be Windings too.
Thanks for your help!
Hi Mariann... Welcome to Chandoo.org and thanks for your comment.
If you wanted to use symbols from wingdings and combine them with % numbers, then you need to setup two labels. One with symbol, in wingdings font and another with value in normal font. Just add the same series again to the chart, make it invisible, add labels. You may need to adjust the alignment / position of label so everything is visible.
[…] firs article explains how you can enhance your charts with symbols. You can simply insert any supported symbol into your data and charts. To some extend you can […]
You're a good person, thank you to share your knowledge with us, I will try to do in my work
Great visualization of variance. My question is that is this possible in powerbi?
How would you go about it?
HELLO, WHY CANT I FIND VALUES FOR LABELS IN EXCEL 2013
Dear chanddo sir,
What to do if we have dynamic range for Chart. How this will work. can you able to make the same thing works on dynamic range.
Sir Chandoo,
Good Day!
First, I'd like to say that I am very grateful for your work and for sharing all these things with us.
I tried to do this chart but it seems that the symbols don't work with text (abs(var%),"0%") unless we keep the Windings font style.
The problem is, it converts the text into symbol as well and you wont see the 0% anymore. I'm using Windows 7.
WOW - Segoe UI Emoji
This is the greatest discovery for me this month 🙂 Thanks for sharing.
Here's my two-cents:
https://wmfexcel.com/2019/02/17/a-compelling-chart-in-three-minutes/
Sir This is awesome chart, and very easy to made because of your way to explain is very simple , everyone can do. Thank you
one problem i am facing, I hv made this chart , but when i am inserting data table to chart it is showing two times , how can i resolve this
in this chart when i am adding new month data for example first i made this chart jan to mar but when i add data for the apr month graphs updated automatically but labels are missing for that new month
Hi Renuka,
Please make sure the formulas for labels are also calculated for extra months. Just drag down the series and set label range to appropriate address.
So I am playing with the Actual chart here - but amounts are bigger than your - you have 600 as Budget - my budget is 104,000 - is there a way to shorten that I am unaware of
thank you - I LOVE YOUR SITE
Thanks for the tips and tricks on Excel. In the Planned versus Actual chart examples, you use multiple values (ex. multiple Categories in above). How can this be done when we have only 1 set of values? For example if I have only this:
Planned Actual
SOW Budget 417480 367551
How can I create a single bar chart like the one above?
Thank you Chandoo.
This one is just perfect for my Quarterly Review presentation on Operational Budget against Actual Performance for the Hospital I'm currently working with.
Just Subscribed today (10 minutes ago)
Is there a way to make the table of data into a pivot table to be able to add a slicer for the graph due to many different categories and months?
Hi, I tried to modify you template with something appropriate for me, and I found a problem. this template was modified by me started with excel 2010, then 2016 and finally 2019. Same thing - somehow appear an error - or didn't show the emoticons for positive percentage or doubled the emoticons for some rows. I suspect to be from excel. if is need it I can sand you my xlsx for study. Please help if you can.
Hi Chandoo,
Could you please check the Var Formula in Step1. You have mentioned budget-actual and when i did this i got different values but when reversed like actual-budget i got the actual value what you have demonstrated in step1.
Please share your view.
This is a great chart (budget vs. actual). However, in trying recreate it, I cannot color in the UP Down bars individually, and they all become formatted with the same color. I'm using Office 365. Look forward to the feedback.
Thanks.
Dan
pls explain in detail step 7
While in the Excel sheet you have used following formula for Var
Var = Actual - Budget
But
in the note, you have written
Var = Budget - Actual
Good Presentation and Data information.thank you so much chandoo.