+ Reply to Thread
Results 1 to 3 of 3

Assigning a zipcode in a simulation given the probability of having a bill in that zipcode

  1. #1
    Registered User
    Join Date
    08-06-2013
    Location
    Philadelphia, United States of America
    MS-Off Ver
    Excel 2010
    Posts
    3

    Assigning a zipcode in a simulation given the probability of having a bill in that zipcode

    So I am new to Excel and have a problem I am not sure how to approach. I have a list of zipcodes each with a number of bills in each. So there is a certain percentage or probability that the bill will be in that zipcode. What I want to do is create a simulation that given a bill will assign it a zipcode given the list of probabilities. I will attach the spread sheet so you know what I am dealing with.

    Thank you!!!!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Assigning a zipcode in a simulation given the probability of having a bill in that zip

    Hi
    I'm sure one of the forum Gurus could find a more elegant solution, but this formula seems to work

    It generates a random number between 0 and 1, looks up that number in your cumulative probabilities column (D), and finds the corresponding zip code in column A. Because the values in column D are cumulative, it should retun zip codes according to the probability of their occurring.

    Let me know if this works for you.

    Please Login or Register  to view this content.
    Last edited by NickyC; 08-07-2013 at 04:24 AM. Reason: typos

  3. #3
    Registered User
    Join Date
    08-06-2013
    Location
    Philadelphia, United States of America
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Assigning a zipcode in a simulation given the probability of having a bill in that zip

    Hey so I gave it a try and it worked wonders! I initially had the problem that if the random # was under the value for the first zip code it would return a #N/A. I fixed this simply by adding a row before my data as zipcode 0 total 0. That did the trick and now I know how to solve this type of problem. What a great help! Solved!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Get the nearest address according to zipcode
    By wellous in forum Excel General
    Replies: 4
    Last Post: 11-19-2011, 03:28 PM
  2. Assigning Cells with different Values (Zipcode) a Word (Borough)
    By inputsandoutputsn00b in forum Excel General
    Replies: 1
    Last Post: 11-02-2011, 05:20 PM
  3. Excel 2007 : Zipcode sorting problem
    By debrant in forum Excel General
    Replies: 15
    Last Post: 08-20-2010, 07:00 PM
  4. Parsing Address/ZipCode
    By scotfitz in forum Excel General
    Replies: 4
    Last Post: 12-22-2009, 04:06 PM
  5. [SOLVED] zipcode, enter 5, show 3
    By JcR in forum Excel General
    Replies: 2
    Last Post: 03-14-2006, 02:35 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1