+ Reply to Thread
Results 1 to 6 of 6

Copy variably sized range and paste values in another sheet

  1. #1
    Forum Contributor
    Join Date
    01-11-2013
    Location
    Sweden
    MS-Off Ver
    MS 365
    Posts
    188

    Copy variably sized range and paste values in another sheet

    Hi there,

    I have had great help here before and got the code to copy a varibly sized range in one sheet ("Indata") and then to paste it in another sheet("GrundData") on the first empty row. The code for this is:

    Please Login or Register  to view this content.
    I have a problem though, if there are formulas in sheet "Indata", they are pasted in like formulas in sheet "GrundData". I need it to be pasted like values.

    Hope someone can help me to change my code so there only will be values in sheet "GrundData".

    /Masun

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Copy variably sized range and paste values in another sheet

    Masun

    Give this a try.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    01-11-2013
    Location
    Sweden
    MS-Off Ver
    MS 365
    Posts
    188

    Re: Copy variably sized range and paste values in another sheet

    Hi Norie,

    Thank so much for trying to help me!

    Something strange happens when I run your code. I dont know why but columns H:P gets empty.

    Hope you can take the time to help me here, if so... I assume its easier if you can see the file so I´ve uploaded it.

    Masun
    Attached Files Attached Files

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Copy variably sized range and paste values in another sheet

    There's no data in the sheet 'Indata'.

  5. #5
    Forum Contributor
    Join Date
    01-11-2013
    Location
    Sweden
    MS-Off Ver
    MS 365
    Posts
    188

    Re: Copy variably sized range and paste values in another sheet

    Hi again,

    I probably expressed my self poorly. My bad. I did it so you could see the entire process.

    If you copy sheet "Data with formulas" and paste it in "Indata" you will see.

    /Masun

  6. #6
    Forum Contributor
    Join Date
    01-11-2013
    Location
    Sweden
    MS-Off Ver
    MS 365
    Posts
    188

    Re: Copy variably sized range and paste values in another sheet

    Hi again,

    Eith the influence from your code, Norie, I added .PasteSpecial xlPasteValues to my original code and that worked.

    Thanks.


    /Masun

+ 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