+ Reply to Thread
Results 1 to 6 of 6

Restrict rows

  1. #1
    Registered User
    Join Date
    05-02-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    Restrict rows

    Hello lovely forum people,

    I would like to be able to limit the amount of rows that can be pasted in to a column then carry over the remainder to the next column and so on.

    Example: I have 100 rows to paste into a sheet. I would like to limit the amount of rows to 30.
    What I would like to happen is I paste my 100 rows of text into column A and I end up with 30 rows in column A B and C and 10 rows in column D.

    Many Thanks
    Paul

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Restrict rows

    You want to bypass the Excel COPY function. I don't think it can be done with regular events prgramming. I would recommend you to place a SPECIAL COPY button on your sheet that would trigger a macro to do it.
    See attached file
    Here is the macro:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by p24leclerc; 05-22-2013 at 09:48 PM.
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Registered User
    Join Date
    05-02-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Restrict rows

    Pierre,

    You have revolutionised my working life. Saved me many many hours of monotonous copy and paste.

    Merci beaucoup
    Paul Hyland

  4. #4
    Registered User
    Join Date
    05-02-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Restrict rows

    Hi Pierre (macro guru),

    Is there a way to do the opposite?

    I would like to take many columns with varying amounts of rows and put them all into one column.

    Example: Column B has 10 rows of text Column C has 5 rows of text and Column D has 15 rows of text.
    What I would like to happen is: I select columns B, C, and D, press the magic button and they all go in to column A.
    B followed by C followed by D and so on.

    So Colunm A would end up with with 30 rows, B followed by C followed by D and so on.


    Many thanks
    Paul

  5. #5
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Restrict rows

    There you are.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Restrict rows

    Here is another macro which is more flexible then the first one.
    Please Login or Register  to view this content.

+ 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