+ Reply to Thread
Results 1 to 11 of 11

Paste Selection in next new empty row on different sheet

  1. #1
    Registered User
    Join Date
    07-12-2009
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    49

    Paste Selection in next new empty row on different sheet

    This is what I have got so far....can't figure it out though:

    Please Login or Register  to view this content.
    Thanks for any help
    Last edited by DonkeyOte; 07-15-2009 at 02:26 AM.

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Paste Selection in next new empty row on different sheet

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-12-2009
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    49

    Paste Selection in next new empty row on different sheet

    This is what I have got so far....can't figure it out though:

    Please Login or Register  to view this content.
    Thanks for any help

  4. #4
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: Paste Selection in next new empty row on different sheet

    I usually go with something like
    Please Login or Register  to view this content.
    I wouldn't do it exactly like that if it was mine, but you're using a macro recorder (which is a great way to learn), and I don't want to mess with your formula too much. Generally you stop using select and paste, and proceed to find a cell, then make the destination cell simply = the source cell without the copying and pasting.

    mew!
    Last edited by mewingkitty; 07-14-2009 at 09:38 PM.
    =IF(AND(OR(BLONDE,BRUNETTE,REDHEAD),OR(MY PLACE,HER PLACE),ME),BOW-CHICKA-BOW-WOW,ANOTHER NIGHT ON THE INTERNET)

  5. #5
    Registered User
    Join Date
    07-12-2009
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    49

    Re: Paste Selection in next new empty row on different sheet

    Quote Originally Posted by mewingkitty View Post
    I usually go with something like
    Please Login or Register  to view this content.
    I wouldn't do it exactly like that if it was mine, but you're using a macro recorder (which is a great way to learn), and I don't want to mess with your formula too much. Generally you stop using select and paste, and proceed to find a cell, then make the destination cell simply = the source cell without the copying and pasting.

    mew!
    Apologies if I sound daft as I am a complete NOOB :D

    Can I use the above code if my original selection is copied from a relative cell?

    Also, Can you please show me where in my original code you would insert your code

    Where is a good place to learn about the syntax (DIM, Integer ect ect) as I currently only understand how to select sheets, copy/paste data ect

    Thx again

  6. #6
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: Paste Selection in next new empty row on different sheet

    Yes, you can.
    You'll notice if you copy/paste something, you can highlight everything you want and copy, then paste when you have only one cell selected. It always assumes you're pasting down and to the right if there's more than one cell.

    As per where it goes, declarations always at the top, code before the insert, so:

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: Paste Selection in next new empty row on different sheet

    Now what I'd do would be more like:
    Please Login or Register  to view this content.
    To copy the first 20 columns of whatever row the activecell was on into the first blank row of the next page.

    p.s.
    No worries about sounding "daft". We all started sometime, and none of us had a clue what we were doing when we started There's always more to learn.

  8. #8
    Registered User
    Join Date
    07-12-2009
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    49

    Re: Paste Selection in next new empty row on different sheet

    Quote Originally Posted by mewingkitty View Post
    Yes, you can.
    You'll notice if you copy/paste something, you can highlight everything you want and copy, then paste when you have only one cell selected. It always assumes you're pasting down and to the right if there's more than one cell.

    As per where it goes, declarations always at the top, code before the insert, so:

    Please Login or Register  to view this content.
    LEGEND..

    Thanks for that....saved me hours...

    One last question....How can I alter the above code to only search for empty cells below row 12?

    Can you point me in a good direction to learn all the syntax so I understand what I am learning....Or is more the case of learn as we go?

    Thanks again

  9. #9
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: Paste Selection in next new empty row on different sheet

    I picked up a VBA book when I got started to be honest with you.
    A lot of the general concepts are not well explained by many online. Once you get a basic drift of it though, it snowballs. Understanding one aspect of one thing is like turning on a light in a room... all kinds of things fall into place that seemed like they were random scattered pieces of information.

    In the code that I've done up for you there, it
    - declares x is an integer (dim x as integer), meaning it can only be whole numbers
    - states that x = 1
    - throws x into a loop which increases x by one each loop until it finds a blank cell


    therefore to start on cell 13, simply change the - x = 1 - at the beginning to an - x = 13 - and it will start looking for empty cells on row 13 and down.

    Personally, I found that the book gave me decent ground level understanding of things, but this site has helped me tons. As I've increased my basic understanding, I've seen the number of questions posted which I've been able to help answer grow dramatically.

    Learning from a book will get you the ground rules, playing with what you know on a site such as this will allow you to challenge your level of knowledge, follow others who are solving questions you didn't know how to solve, and teach you new ways around problems by throwing variables in which were likely not covered in basic explanations.

    And hey.
    Can always ask

    mew!

    Edit:
    If you are going to pursue this online, begin with a few key points such as:
    - "Variables", definitions of them, and why they're needed
    - "Option Explicit" this falls in with variables, makes sense once you get what it does
    - "msgbox" I found that infinitely helpful. Popping up message boxes as you play with code so you see what's happening.
    - "for"/"next" loops
    - The great and powerful "IF/THEN" statement
    - "do while" loops
    - "do until" loops

    after that you'll be looking at properties and events, that's when it gets ossim.

    mew
    Last edited by mewingkitty; 07-15-2009 at 12:21 AM.

  10. #10
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Paste Selection in next new empty row on different sheet

    Going forward please revise the offending post rather than posting a corrected version - I've amended your original and "undeleted" Palmetto's response.

  11. #11
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Paste Selection in next new empty row on different sheet

    cooper1308, do not create multiple threads - I have merged your two thread together.

    Before posting on this board any further please take the time to read the Forum Rules.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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