+ Reply to Thread
Results 1 to 13 of 13

Paste special code

  1. #1
    Registered User
    Join Date
    11-14-2008
    Location
    UK
    Posts
    12

    Paste special code

    Hi all,

    I have a vba code that does everything I want except one thing - is pastes the data, however i need it to paste special the data as the range that i want to copy has formulas.

    What the code is suppose to do is copy a range of data from one sheet and paste special it in the next available blank column in another sheet.

    The code i have is as follows:

    Please Login or Register  to view this content.

    If anyone can help me adjust this code so it paste special the value instead of a normal paste i would be greatful.
    Last edited by royUK; 11-20-2008 at 07:22 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Please read the Forum Rules & use correct Code Tags.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I it pasting over the formulas?

    Why do you need to move the data, your formulas can reference data on another sheet?

  4. #4
    Registered User
    Join Date
    11-14-2008
    Location
    UK
    Posts
    12
    I need to paste special the range as it contains formulas. If i reference it as you have suggested then my file becomes very big and i need to keep the file as small as possible.

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I still don't follow what you mean by pastespecial, do you want to change the formulas to values?

  6. #6
    Registered User
    Join Date
    11-14-2008
    Location
    UK
    Posts
    12
    Sorry for not being clear.

    Range AD4:AD7500 includes formulas - I need the code to copy this range and paste the values into another column.

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Is this right

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    11-14-2008
    Location
    UK
    Posts
    12
    Hi royuk,

    I have tried the code you suggested but it makes no difference - it still copies the formulas instead of the values.

    I have attached the file I am working with which also includes the vba code - this should help you understand the problem I am having.

    Thanks for your help.
    Attached Files Attached Files

  9. #9
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Your source sheet7& target sheet are the same, you are copying AD4:AD7500 - most of which is empty. The formulas are in AE, so are not copied

  10. #10
    Registered User
    Join Date
    11-14-2008
    Location
    UK
    Posts
    12
    My file was to big to attach so i edited the file to reduce the size hence the reason why there is data missing.

    Data in fact will be copying column AE - I made the mistake of copying AD.

    Can you help me to edit the code so it copied the values of column AE?

    Thanks for your replies.

  11. #11
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    This will copy AE to the column as values
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    11-14-2008
    Location
    UK
    Posts
    12
    Thank you very much royuk, this works perfectly! Thanks again!

  13. #13
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    please mark the thread solved & rate the answer

+ 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