+ Reply to Thread
Results 1 to 4 of 4

paste values for specific columns in second to last row

  1. #1
    Registered User
    Join Date
    01-23-2013
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    8

    Post paste values for specific columns in second to last row

    I am trying to go to the second to last column in the specified rows, then paste the value of that cell. This code returns a run time error '438' object doesn't support this property or method at the .Offset (1) line. One issue might be that below the data of the report (what I am trying to run this code on), there is a blank line then a total line. I do not want to go to that...So I think I may need to use the .End(xlDown) function, but when I tried that it did not work either...Any suggestions?





    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    11-20-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    597

    Re: paste values for specific columns in second to last row

    your post was a bit vague, so i'm not sure if this is what you want exactly, this code will go to the last cell in the columns listed
    you can modify the code

    ie. Range(mycolnum(I) & Lastrow).Select ---> Range(mycolnum(I) & Lastrow).offset(-2).Select
    the above will select the third to last row in the given column

    let me know if this is close to what you want




    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-23-2013
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: paste values for specific columns in second to last row

    I need to go to the second to last data row in each of the specified columns then paste the values of the formulas that are in the cells. My code is getting caught up on the .Offset portion.

  4. #4
    Valued Forum Contributor
    Join Date
    11-20-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    597

    Re: paste values for specific columns in second to last row

    is there any data after the total line, if not this should work

    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)

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