+ Reply to Thread
Results 1 to 4 of 4

Copy formulas exact without references changing

  1. #1
    Forum Contributor
    Join Date
    06-23-2005
    Posts
    253

    Copy formulas exact without references changing

    Trying to come up with a VBA procedure to copy a cell formula exact into the clipboard that I can paste (cntrl+V) in any other desired cells without the references changing. That way, I can assign the keys Shift+Ctrl+E to the procedure for a short cut. I know about the $ but there are too many formulas to edit.

    I now do it manually as follows:
    On the desired cell, F2
    Ctrl + Shift + Home
    Ctrl + C
    Esc

    Any ideas?

    mikeburg

  2. #2
    Bruno Campanini
    Guest

    Re: Copy formulas exact without references changing

    "mikeburg" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Trying to come up with a VBA procedure to copy a cell formula exact into
    > the clipboard that I can paste (cntrl+V) in any other desired cells
    > without the references changing. That way, I can assign the keys
    > Shift+Ctrl+E to the procedure for a short cut. I know about the $ but
    > there are too many formulas to edit.
    >
    > I now do it manually as follows:
    > On the desired cell, F2
    > Ctrl + Shift + Home
    > Ctrl + C
    > Esc
    >
    > Any ideas?
    >
    > mikeburg


    Dim A as String
    A = [B50].Formula

    Ciao
    Bruno



  3. #3
    Gord Dibben
    Guest

    Re: Copy formulas exact without references changing

    You can change from relative to absolute en masse using VBA

    Sub Absolute()
    Dim Cell As Range
    For Each Cell In Selection
    If Cell.HasFormula Then
    Cell.Formula = Application.ConvertFormula(Cell.Formula, _
    xlA1, xlA1, xlAbsolute)
    End If
    Next
    End Sub


    Gord Dibben Excel MVP



    >. I know about the $ but
    >> there are too many formulas to edit.



  4. #4
    Forum Contributor
    Join Date
    06-23-2005
    Posts
    253

    How do I get the contents of variable A into clipboard?

    Ciao Bruno's vba code works great. But how do I get the contents of variable A into the clipboard?

    Thanks a million, mikeburg

+ 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