+ Reply to Thread
Results 1 to 4 of 4

vba code to copy number of rows in based on the input message

  1. #1
    Forum Contributor prabhuduraraj09's Avatar
    Join Date
    05-19-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    330

    Arrow vba code to copy number of rows in based on the input message

    Hi all,

    I have a autofiltered data, say which has 16 visible rows.

    as per the input message, user inputs some number which will be less than 10.
    say user inputs 6.

    what i want is, i need a code to copy 6 rows of total visible 16 rows.
    but it should pick random. not first 6 or last 6 rows.
    it should pick random.....

    i need that 6 rows to get copied to next sheet.

    some body please respond..............the main part here is............
    i need number of rows to be copied based on the input message, but Random. Any 6.

    Please please some body help....................

  2. #2
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: vba code to copy number of rows in based on the input message

    How many rows you would say your data has?

  3. #3
    Forum Contributor prabhuduraraj09's Avatar
    Join Date
    05-19-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    330

    Re: vba code to copy number of rows in based on the input message

    Quote Originally Posted by fredlo2010 View Post
    How many rows you would say your data has?
    the number of rows, may vary.....based on the autofilter category.
    it could be maximum of 30 rows. Definitely not more than that.......

    so any time upon filtering the data, it will be less than 30 rows. And based on the input message number
    say i give 12, then code should copy 12 random rows of total visible rows.

  4. #4
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: vba code to copy number of rows in based on the input message

    Maybe something like this will help

    Please Login or Register  to view this content.
    Thanks

+ 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. VBA code to find the row number based on data via input box and the highlight a cell
    By Aditya Sabat in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-21-2014, 05:47 PM
  2. message input box returns lines/rows based on the input
    By excelandclark in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 06-03-2013, 07:35 PM
  3. Macro to Copy Rows based on User Input
    By CharterJP in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-24-2012, 06:13 PM
  4. Auto Copy Rows Based on Cell Input
    By Kazumi in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-02-2011, 04:32 PM
  5. Code to format number input in textbox controls (based on tag) in userform
    By asha3010 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 07-05-2010, 01:09 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