• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

need a formula to generate invoice amount per each customer randomly by

You say 'randomly' but you still need to provide information to describe the available options and the probability of each occurring. For data in categories (which customer, what product etc) this might be based upon historical data or estimates. The main function, RAND(), for generating random numbers gives a uniform distribution over the interval [0, 1].

To turn this into a category or value requires one to calculate the cumulative distribution which varies from 0 to 1. Inverting gives the randomly selected value or category.

In the attached book I show how LOOKUP will do this for a category variable (customer name). To do the same for a continuous price variable you would need a distribution with a maximum cut-off value.
 

Attachments

  • random invoice.xlsx
    13.5 KB · Views: 5
Back
Top