+ Reply to Thread
Results 1 to 6 of 6

vba code to be able to past into the next specified range in the next blank row

Hybrid View

markswan111 vba code to be able to past... 09-21-2016, 08:05 AM
JOHN H. DAVIS Re: vba code to be able to... 09-21-2016, 08:46 AM
markswan111 Re: vba code to be able to... 09-21-2016, 08:14 PM
JOHN H. DAVIS Re: vba code to be able to... 09-22-2016, 07:20 AM
markswan111 Re: vba code to be able to... 09-23-2016, 10:20 AM
JOHN H. DAVIS Re: vba code to be able to... 09-27-2016, 10:23 AM
  1. #1
    Registered User
    Join Date
    04-28-2016
    Location
    usa
    MS-Off Ver
    2007
    Posts
    48

    vba code to be able to past into the next specified range in the next blank row

    Hello Guys,

    I need modify this vba code to be able to past into the next specified range in the next blank row, instead of having to select the row to be pasted into every time

    here is the code

    Windows("mark.xlsx").Activate
    Range("C5:G5").Select
    Selection.COPY
    Windows(sam.xlsb").Activate
    sheets("2").select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    End sub

    many thanks inn advance

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: vba code to be able to past into the next specified range in the next blank row

    Please take a moment to read the forum rules regarding posting code to the Forum. Refer to Rule No. 3 Code Tags.

    http://www.excelforum.com/forum-rule...rum-rules.html

    Sub markswan111()
    Workbooks("mark.xlsx").Sheets("Sheet1").Range("C5:G5").Copy
    Workbooks("sam.xlsb").Sheets("2").Range("C" & Rows.Count).End(3)(2).PasteSpecial xlPasteValues
    End Sub
    See the red you need to identify the sheet. Change as needed.

  3. #3
    Registered User
    Join Date
    04-28-2016
    Location
    usa
    MS-Off Ver
    2007
    Posts
    48

    Re: vba code to be able to past into the next specified range in the next blank row

    Dear Sir,

    hello Dear John,

    The code does not work, I am including two workbooks the source book2 and the pasted into book1, Please check it kindly and let me know the right code or you can just use the macro button (trpro) with the right code.

    I tried my best extensively to make your code work but with no luck.....

    book1
    https://www.dropbox.com/s/al9pfmvaci...ook1.xlsb?dl=0

    book2

    https://www.dropbox.com/s/2uxbmy8gtq...ook2.xlsx?dl=0


    Regards

    Mark swan

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: vba code to be able to past into the next specified range in the next blank row

    I'm not familiar with dropbox. Refer too the link I posted after Rule 13c about attaching workbooks too the Forum and use that method.

  5. #5
    Registered User
    Join Date
    04-28-2016
    Location
    usa
    MS-Off Ver
    2007
    Posts
    48

    Re: vba code to be able to past into the next specified range in the next blank row

    rule 13c?
    13c. Do not solicit payments in your posts or signatures.
    This is a free forum, all of your free forum contributions will be offered in this spirit, both in posts and signatures.

    where did I solicit anything? I am trying to send you my work book so you can help me, if you have a way for to be able to send it then thank you and mention so and guide me, and if not then thank you anyway.

    and it seems there is no way to upload a file to your forum.

    thanks

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: vba code to be able to past into the next specified range in the next blank row


+ 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. Past also blank rows ?
    By TeloS53 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-26-2015, 03:44 PM
  2. Advice and help with a copy past code or filldown formula code
    By KELLIS in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-14-2013, 02:07 PM
  3. [SOLVED] Code for Range does not go past first instance.
    By aadeshgandhi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-19-2013, 11:00 AM
  4. looking for a vb code for blank cells in a range.
    By pelums1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-05-2013, 01:33 PM
  5. loop past blank cell
    By Zrx in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-19-2011, 08:20 PM
  6. Past as Value Not Blank
    By sglick in forum Excel General
    Replies: 5
    Last Post: 04-03-2008, 01:21 PM
  7. Autofilter past blank rows
    By lunker55 in forum Excel General
    Replies: 4
    Last Post: 10-04-2005, 11:05 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