Results 1 to 3 of 3

Thread: How to get a kind of random report generator for Audit purpose via Excel

  1. #1
    Join Date
    Feb 2012
    Posts
    11

    How to get a kind of random report generator for Audit purpose via Excel

    I have a set of data that contains page numbers from a report that I run. These page numbers can appear multiple times in any given report based on activity on that page. I run a frequency of the number of times a given page appears. I would like to take a random sampling of this report for audit purposes, but I would like the random sample to be propotionally weighted based on the frequency a page appears on my reports. For example if ten page numbers appear on my report, but page number 1 appears four
    times. I want page number 1 to be weighted in such a way that it is four times as likely to appear on my random sampling. Is there anyway to set a up a generator to make this happen. Thanks in advance.

  2. #2
    Join Date
    Jul 2011
    Posts
    623

    Re: How to get a kind of random report generator for Audit purpose via Excel

    Make a copy of your list with each entry separate four separate listings of page 1 from your example next to this column enter = rand() copy and paste in the cells next to each page listing select both columns and sort based on the rand() column If you are willing to check page 1 more than once just take the top or bottom number of cells to check. If you just want the selection to have mulitple chances and you only want to test page1 oncejsust select the top unique numbers in your list. there are many ways
    ot do this.

  3. #3
    Join Date
    Jul 2011
    Posts
    634

    Re: How to get a kind of random report generator for Audit purpose via Excel

    Suppose you currently have two columns of data, the page numbers (B1:B100) and their frequencies (C1:C100). Add a third column to the left (which may be hidden) for the cumulative frequency. It starts at zero; subsequent cells add the frequency of the previous row (e.g. A2 is =A1+C1). The random sample can be selected by: =vlookup(sum(C1:C100)*rand(), A1:C100, 2) Of course, you could compute SUM(C1:C100) once in a cell (e.g. A101) and refer to that cell in the VLOOKUP() function.

    Note: I do not like the fact that RAND() is recomputed every time the spreadsheet is modified -- anywhere(!), and I do not like to disable auto calculation. So I create a UDF (myrand) to perform the Rnd() computation. You could use ctrl-alt-F9 to force the random selection to be recalculated. Or you could pass a cell or range reference to the UDF solely for the purpose of recalculating the random selection whenever a value in that cell or range is changed.

Similar Threads

  1. Replies: 2
    Last Post: 21-02-2012, 12:56 PM
  2. How to get a Weekly Report in Microsoft Excel
    By Corey Dunnett in forum MS Office Support
    Replies: 2
    Last Post: 01-02-2012, 07:02 PM
  3. How do I set up a random name generator in Micrsoft Excel
    By clickroot in forum Windows Software
    Replies: 4
    Last Post: 31-12-2011, 06:03 PM
  4. Random Map Generator for Might & Magic Heroes VI
    By Rumer in forum Video Games
    Replies: 8
    Last Post: 07-11-2011, 07:47 AM
  5. Replies: 1
    Last Post: 02-04-2011, 05:35 AM

Tags for this Thread

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
  •  
Page generated in 1,713,997,790.02079 seconds with 16 queries