+ Reply to Thread
Results 1 to 4 of 4

VB Code to apply random percentage in numbers

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    VB Code to apply random percentage in numbers

    Hello:

    Please refer to attached file.
    I have numbers as shown in cells G4:G9 and it adds up to 1 in cell G10

    I need VB code to do the following:

    Need random % bewteen 2-8 as variance and calculate new numbers in cell K5:K9, K4 needs to have formula =K11-sum(K5:K9)

    I have shown in column I assuming i have Random % as 3.5%

    Same in column O and S

    Let me know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: VB Code to apply random percentage in numbers

    Is this what you want? It's "straight formula" rather than VB.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to apply random percentage in numbers

    Hello dflak:
    Thanks a lot.
    I really need VB Code which will handle my situation rather then formula.

    Riz

  4. #4
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to apply random percentage in numbers

    Hello dflak:

    I think i will go with formula approach.
    Thanks a lot

    Riz

+ 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. Filtering random numbers without regenerating random numbers
    By ptack in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-07-2022, 04:03 PM
  2. Replies: 2
    Last Post: 07-24-2018, 03:47 AM
  3. Canadian zip code style random numbers
    By Shocked in forum Excel General
    Replies: 2
    Last Post: 06-10-2008, 08:53 AM
  4. Code for Unique random numbers
    By davidm in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-09-2007, 02:47 PM
  5. code not working properly - VBA beginner (random numbers generation, no repeats)
    By msburza in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-11-2006, 01:10 PM
  6. Non-random numbers generated by excel's data analysis random gener
    By Allie in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-17-2005, 02:05 AM
  7. [SOLVED] Re: Non-random numbers generated by excel's data analysis random gener
    By Harlan Grove in forum Excel General
    Replies: 2
    Last Post: 09-13-2005, 12:05 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