+ Reply to Thread
Results 1 to 2 of 2

VBA : Function for Simulations

  1. #1
    Registered User
    Join Date
    07-01-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    2

    Smile VBA : Function for Simulations

    Hi guys,

    I have range A1 to A5 : Each containing a function =NORM.INV(RAND(),1,1). So whenever I refresh the values would change.

    I have range A6 which contains a sum of range A1 to A5 : =SUM(A1:A5) . Again, whenever I refresh the value would change.

    Now, I want to create an excel function such that based on the number specified in the function( say n = 3), the function should be able to get 3 random value of range A6. Then based on that i will be able to find the average of this 3 values.

    Its like refreshing 3 times and put them into an array and getting the average.

    So at the moment I have something like this:

    Please Login or Register  to view this content.
    Really appreciate the help.

    Thank You.
    Last edited by tandabani; 07-26-2012 at 09:53 PM. Reason: Title not detailed enough

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: VBA : Function

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. If you need more information on how to use them, check my signature.
    Last edited by arlu1201; 07-27-2012 at 03:58 AM.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1