
One of the easiest is to have more orders with less available customers – those customers would be repeated by random selection. There are a few ways to handle this scenario.
Mock data generator online free#
Feel free to adjust this with more numbers or different probabilities. I realize that customers could buy even more than 4, but I had to draw the line somewhere. One (1) has the highest probability with four (4) having the smallest. For this model, I choose to use probabilities for purchasing 1, 2, 3, or 4 quantities of a product.
Mock data generator online code#
Generating the code in R had its own set of challenges, but they were manageable. Instead, I created the routines in R language, which was much easier due to its extensive tools available in the language. I started implementing VBA code (code that results from recording macros).


But I had to do a lot of manually data entry as a result that is proved to be not useful as an order generation table. I tried to use random number generation followed by IF statements. I tried as hard as I could to come up with procedures to generate the orders table completely from Excel and with no macros. The other numeric fields are keyed to other tables that contain descriptions of those keys. The first column (Order ID, which is orderNum ) is generated as a sequence. With the exception of the date field, the other fields are numeric pointers. Feel free to name them whatever names work for you.

Note: due to the tool I was using for my analysis after generating data, the headers in the above sample file are different than what will be generated from the algorithm.
