+ Reply to Thread
Results 1 to 13 of 13

Copy and Paste as Values to Last Empty Row of Specific Range

  1. #1
    Registered User
    Join Date
    07-28-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    80

    Copy and Paste as Values to Last Empty Row of Specific Range

    Hello everyone,

    I have some difficulty in finding a solution to have a VBA that copy and paste as values to last empty row of specific range.

    I tried this code, but did not work.
    Please Login or Register  to view this content.
    I attach sample file for more clarification.

    Thank you so much in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy and Paste as Values to Last Empty Row of Specific Range

    Please Login or Register  to view this content.
    Last edited by AB33; 08-15-2018 at 05:56 AM.

  3. #3
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Copy and Paste as Values to Last Empty Row of Specific Range

    Hello chergian,

    Please upload a more complete sample Workbook, showing us where to copy what from where, and paste to where.

    Regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  4. #4
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Copy and Paste as Values to Last Empty Row of Specific Range

    @ AB33,

    Don't do this to me. It is hard enough being stupid and absent minded.

    How are you keeping buddy?

    Regards.

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy and Paste as Values to Last Empty Row of Specific Range

    Hi Winon,
    Fine mate!
    I also feel the same. As I am not as regular as I was once, I beginning to forget VBA.

  6. #6
    Registered User
    Join Date
    07-28-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    80

    Re: Copy and Paste as Values to Last Empty Row of Specific Range

    @AB33, @Winon

    Thank you so much for the reply....

    I tried AB33 code but it copy to Item C instead to Item A. I attach again the file with more specific information.

    Once again thank you for the help.
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Hi ! Try this !


    As a beginner starter :

    PHP Code: 
    Sub Demo1()
            
    Dim VR&, W
        With Sheet1
                V 
    = .Range("B1", .Cells(.Rows.Count2).End(xlUp)).Value2
            
    For 2 To .Cells(9).End(xlDown).Row
                W 
    Application.Match(.Cells(R8).Value2V0)
                If 
    IsNumeric(WThen If .Cells(114).Value2 "" Then _
                    
    .Cells(R9).Copy .Cells(Application.Max(.Cells(114).End(xlUp)(2).RowW), 4)
            
    Next
        End With
    End Sub 
    Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !
    Last edited by Marc L; 08-15-2018 at 11:52 PM. Reason: optimization …

  8. #8
    Registered User
    Join Date
    07-28-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    80

    Re: Copy and Paste as Values to Last Empty Row of Specific Range

    @Marc L

    Thank you so much... it works, however it paste the link instead of the values, that's why it resulted to #REF.

    How to tweak this code to make it paste as values?

  9. #9
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Copy and Paste as Values to Last Empty Row of Specific Range

    Use this line
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  10. #10
    Registered User
    Join Date
    07-28-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    80

    Re: Copy and Paste as Values to Last Empty Row of Specific Range

    @YasserKhalil

    It works! thank you much... There is one problem when i put the code in my original worksheet, there is an Error "Variable not define"..

    Im so sorry i did make the same format of the sample file based on original.

    Attach is the file with original format.

    Hoping my mistakes is forgivable.
    Attached Files Attached Files

  11. #11
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Copy and Paste as Values to Last Empty Row of Specific Range

    You have changed the structure in the new workbook ..
    As for the Sheet1 it is the code name of the worksheet and in your new file it is Sheet45 or you can use it like that
    Please Login or Register  to view this content.

  12. #12
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Copy and Paste as Values to Last Empty Row of Specific Range

    Quote Originally Posted by chergian View Post
    however it paste the link instead of the values, that's why it resulted to #REF.
    As there is no link in your post #6 attachment …

  13. #13
    Registered User
    Join Date
    07-28-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    80

    Re: Copy and Paste as Values to Last Empty Row of Specific Range

    @Marc L and @YasserKhalil

    Thank you so so much... it works perfectly now!!... @Marc L, im so sorry i wasn't able to make a link on the data of the attachment, 'coz in my thought, it will make an error of my attachment. That is why i put a description of my attachment that the data was link to other sheet or worksheets...

    Once again thank you so much! this thread was solved!

+ 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. Replies: 8
    Last Post: 10-11-2017, 02:45 PM
  2. Copy paste specific range to last non empty cell in Column A different sheet
    By realrookie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-18-2016, 04:20 PM
  3. [SOLVED] copy range and paste values only to another sheet in next empty row
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-22-2015, 05:08 AM
  4. [SOLVED] Copy and paste values in column range into first empty column to the left
    By gbatz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-15-2014, 06:59 PM
  5. [SOLVED] Copy and paste range as values to specific sheet/range
    By lukestkd in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-06-2014, 09:48 PM
  6. Copy and paste specific range to date specific range in alternate sheet
    By alanalmarza in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-21-2013, 08:29 AM
  7. Pick, copy and paste rows containing specific range of values
    By Kenneyd71 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-20-2012, 09: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