+ Reply to Thread
Results 1 to 13 of 13

PasteSpecial into first empty cell in a column

  1. #1
    Registered User
    Join Date
    12-08-2017
    Location
    Venice, Florida
    MS-Off Ver
    2016
    Posts
    22

    PasteSpecial into first empty cell in a column

    I'm trying to pastespecial into the first empty cell in a column.

    I've used the below in another macro that just pastes the value into a cell and works fine. What is required to do this in a column? Thanks for any assistance.

    Sub Copy()
    Sheets("Pre_2001").Range("H8").Copy
    With Sheets("Quantification").Range("R2").End(xlToLeft).Offset(, 17)
    .PasteSpecial xlPasteFormats
    .PasteSpecial xlPasteValues
    End With
    End Sub

  2. #2
    Registered User
    Join Date
    12-08-2017
    Location
    Venice, Florida
    MS-Off Ver
    2016
    Posts
    22

    Re: PasteSpecial into first empty cell in a column

    And I'm copying from another worksheet if it isn't clear from the code. thanks

  3. #3
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: PasteSpecial into first empty cell in a column

    Hi alanos206
    Please use code tags (
    Please Login or Register  to view this content.
    [/noparse]
    ) when Posting code: Rule 3: https://www.excelforum.com/forum-rul...rum-rules.html

    You should see this for your code just before you post in the Forum editor
    [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code]
    _.______________
    I am not totally clear on what it is you want to do
    Possibly what you need to do is determine the (last row +1) in a column, see here:
    https://www.excelforum.com/hello-int...ml#post4815736


    This would put something in the next free row in column A in Worksheet "Quantification"
    Please Login or Register  to view this content.
    Alan
    Last edited by Doc.AElstein; 01-12-2018 at 08:21 AM.
    '_- Google first, like this _ site:ExcelForum.com Gamut
    Use Code Tags: Highlight code; click on the # icon above,
    Post screenshots COPYABLE to a Spredsheet; NOT IMAGES PLEASE
    http://www.excelforum.com/the-water-...ml#post4109080
    https://app.box.com/s/gjpa8mk8ko4vkwcke3ig2w8z2wkfvrtv
    http://excelmatters.com/excel-forums/ ( Scrolll down to bottom )

  4. #4
    Registered User
    Join Date
    12-08-2017
    Location
    Venice, Florida
    MS-Off Ver
    2016
    Posts
    22

    Re: PasteSpecial into first empty cell in a column

    Thank you. The only issue is that the column cells that I'm pasting to already have data in the column cells preceding them. So while the code works its pasting into the first cell in column "R" where there is no data. Data needs to be pasted in the highlighted cell. Thanks so much! Alan

    Capture.JPG

  5. #5
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: PasteSpecial into first empty cell in a column

    You can specify the column to find the last row in
    Please Login or Register  to view this content.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  6. #6
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: PasteSpecial into first empty cell in a column

    Hi alanos206
    The code is set to find the last used row in column 1 ( Clm = 1 ) ( Column “A” )
    I assume you already changed the column for the PasteSpecial to R ? , otherwise my code would be pasting into column A
    So you just need to adjust Clm to that for column R
    So Clm = 18

    Alan

    Edit: Or like Don said

    ( Belated Happy New Year , Don :-) )
    Last edited by Doc.AElstein; 01-11-2018 at 09:24 AM. Reason: Saw Don's post :-) Hello Don . Belated Happy New Year

  7. #7
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: PasteSpecial into first empty cell in a column

    Happy New Year to you too, Alan!

    I find it a lot simpler to use column letters rather than numbers.

  8. #8
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: PasteSpecial into first empty cell in a column

    Hi Don,
    I am not prejudice, but confess to having a tenancy towards the column letter also!
    I usually have a simple Function kicking around to convert any column numbers into letters.
    I don’t like the Cell(r, c) type thingy much… I will usually convert a column number to a letter and use the Range(“ “) variation. - I feel a lot more comfortable with that
    https://www.excelforum.com/excel-pro...ml#post4813760
    Alan

  9. #9
    Registered User
    Join Date
    12-08-2017
    Location
    Venice, Florida
    MS-Off Ver
    2016
    Posts
    22

    Re: PasteSpecial into first empty cell in a column

    Works great! Really appreciate the assistance. Alan

  10. #10
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: PasteSpecial into first empty cell in a column

    Yous welcome, thanks for the feedback.
    Don made a good point about the column letter possibillity, which I too prefer actually
    Alan

    Edit: Please mark the Thread As Solved, if I was quick enough to catch you, Thanks
    ( ...Most of the excelforum software can be a bit quirky sometimes… you might be able to figure out how to do it from this: https://www.excelforum.com/developme...ml#post4668790 …. If you are lucky the first simple Method might work…
    Mark Solved Dali sandy.jpg https://imgur.com/bfV11kW
    )
    Last edited by Doc.AElstein; 01-11-2018 at 10:45 AM.

  11. #11
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: PasteSpecial into first empty cell in a column

    Quote Originally Posted by Doc.AElstein View Post
    I usually have a simple Function kicking around to convert any column numbers into letters.
    Seems like a lot of effort for no real benefit to me.

  12. #12
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: PasteSpecial into first empty cell in a column

    No one understands the ‘_- prettyness of my codes '_- Let me be, .. me
    Please Login or Register  to view this content.
    Last edited by Doc.AElstein; 01-11-2018 at 12:18 PM. Reason: '_- just for fun '_-

  13. #13
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: PasteSpecial into first empty cell in a column

    Variety is the spice of life, as they say.

    As long as I don't have to deal with it, do whatever makes you happy...

+ 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. Copy data and paste to another column incrementing that column to next empty cell
    By edens2021 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-29-2015, 11:43 AM
  2. [SOLVED] Paste formula to the last empty cell based on a non-empty cell on another column
    By bhenlee in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-02-2015, 04:07 PM
  3. Toggle Button to Filter Empty cells in one column, and cell value in other column
    By goomblar in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-18-2014, 06:44 AM
  4. Excel VBA evaluate if Cell in column D is empty and Cell in column A is not empty
    By Jovillanueva in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-02-2014, 08:09 PM
  5. Replies: 5
    Last Post: 05-13-2014, 10:19 AM
  6. Need to find empty filled cells in a column and copy to the empty cell below
    By Grahamfeeley in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-30-2014, 10:09 AM
  7. [SOLVED] Macro to find the empty cell in a column and copy a adjacent row to another column.
    By naga in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-18-2013, 07:44 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