+ Reply to Thread
Results 1 to 4 of 4

Copying Values and Formatting without Copy/PasteSpecial

  1. #1
    Registered User
    Join Date
    08-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    10

    Copying Values and Formatting without Copy/PasteSpecial

    Hi all,

    I've written VBA code to loop through some data and paste the values and formatting into another sheet, and while it works okay, it has to go through a huge amount of data so I'm trying to eliminate the copy/pastespecial step to speed up the code.

    Is there a way to write a code like:

    Example
    Please Login or Register  to view this content.
    that will copy the formatting along with the values?


    Here is the code I currently have written:
    Please Login or Register  to view this content.
    Thanks for your help.

    Chris

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Copying Values and Formatting without Copy/PasteSpecial

    Hi, Chris,

    maybe like this:

    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    08-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Copying Values and Formatting without Copy/PasteSpecial

    Hi Holger,

    Thanks for the response. I tried your code and while it does copy the values over, the formatting changes slightly (# of decimals etc) and I also lose conditional formatting I have on the original cells. The code also pastes each new line of data on top of the data it just pasted in.

    Any other thoughts?


    Thanks,

    Chris

  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: Copying Values and Formatting without Copy/PasteSpecial

    Chris

    Slightly off topic, but have you considered using a filter to get the data you want then copying it in one go?

+ 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