+ Reply to Thread
Results 1 to 4 of 4

MACRO RUN random percentage and copy of column values

  1. #1
    Registered User
    Join Date
    09-13-2013
    Location
    Italy
    MS-Off Ver
    Excel 2007
    Posts
    6

    MACRO RUN random percentage and copy of column values

    Dear all, thanks in advance for looking at this thread..

    I have found the following macro that randomly select an amount of cells based on a popup window that ask you how many cells you need to randomly get and copy the values into another column. So basically given a Column A with a series of numbers (there might be even empty cells in the middle), you run the macro and you are requested to provide the number of cells you want to be copied, the macro make some calculation and work on Columns B and C and copy the values randomly in Column D.

    Said that.. my question is.. would it be possible to replace the number you request to have a copy with a percentage request? (e.g. instead of copy 15 numbers out 100, copy the 10% or 20% or whichever% out of 100) bear always in mind that within all the column A there might be some empty cells too which of course needs to be NOT calculated by the percentage..

    Please Login or Register  to view this content.

    Moderator Note:


    Pls use code tags around your code as per forum rules.
    Last edited by Fotis1991; 09-17-2013 at 05:03 AM.

  2. #2
    Registered User
    Join Date
    09-13-2013
    Location
    Italy
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: MACRO RUN random percentage and copy of column values

    Thanks Moderator for your support, was my first "copy code" thanks again hoping to get an answer soon.

    Cheers

    Mod Note:

    I am also hoping to find your solution soon.Thanks for undrstanding! Good luck.
    Last edited by Fotis1991; 09-17-2013 at 05:42 AM.

  3. #3
    Registered User
    Join Date
    09-13-2013
    Location
    Italy
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: MACRO RUN random percentage and copy of column values

    Dear Moderator, I found the solution (wasn't that complicated in the end.. or at least is always "easy" after done)

    I'm sharing it for everyone knowledge or possible need

    Replace this part

    Please Login or Register  to view this content.
    with this

    Please Login or Register  to view this content.

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: MACRO RUN random percentage and copy of column values

    Thanks for sharing your solution with us!

    Now you have to do something more according the forum rules.

    Please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

+ 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. Macro to copy column values from one sheet to another
    By eemrun in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-02-2013, 04:46 PM
  2. [SOLVED] Macro to Copy Values in Single Column to a 3 Column Table
    By rlee12 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-04-2013, 11:22 PM
  3. [SOLVED] Macro to copy values into next column to the right
    By chuff in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-20-2012, 11:05 PM
  4. Macro that will copy values in Column J and paste values to Column B in new sheet
    By Phixtit in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-16-2010, 04:56 PM
  5. Replies: 4
    Last Post: 05-28-2009, 04:08 AM

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