Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: VBA - Paste-Special Formula for Cells with Values

  1. #1
    New Member
    Join Date
    Feb 2008
    Posts
    35
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default VBA - Paste-Special Formula for Cells with Values

    I'm looking for some VBA code that will allow me to do the following:

    In a given worksheet, for each cell that has data in it (numbers or text), I want to paste-special the formula that is in the clipboard.

    Any suggestions?

  2. #2
    Board Regular
    Join Date
    Aug 2005
    Posts
    712
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VBA - Paste-Special Formula for Cells with Values

    Quote Originally Posted by jacksparrow View Post
    I'm looking for some VBA code that will allow me to do the following:

    In a given worksheet, for each cell that has data in it (numbers or text), I want to paste-special the formula that is in the clipboard.

    Any suggestions?
    This will replace any constants with numbers or text in the worksheet:
    Code:
    Cells.SpecialCells(xlCellTypeConstants, 3).PasteSpecial Paste:=xlPasteFormulas

  3. #3
    New Member
    Join Date
    Feb 2008
    Posts
    35
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VBA - Paste-Special Formula for Cells with Values

    Thanks, you just saved me hours of work!

  4. #4
    Board Regular
    Join Date
    Jan 2012
    Posts
    208
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VBA - Paste-Special Formula for Cells with Values

    Quote Originally Posted by goldfish View Post
    This will replace any constants with numbers or text in the worksheet:
    Code:
    Cells.SpecialCells(xlCellTypeConstants, 3).PasteSpecial Paste:=xlPasteFormulas
    i need full code

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.
     


DMCA.com