+ Reply to Thread
Results 1 to 3 of 3

paste formula without workbook reference

  1. #1
    Thomas Wright
    Guest

    paste formula without workbook reference

    when working out the details I often "perfect a formula in one workbook and
    then paste it into another. However, I can not find a wyanot to paste the
    formula with ref. to the first notebook. I then have to spend more time
    deleting references. Its a bit of a hassle.

    Is there a way not to paste the ref. to the first workbook?

    Thanks

    Tom



  2. #2
    Dave Peterson
    Guest

    Re: paste formula without workbook reference

    Maybe something like:

    Workbooks("book2.xls").Worksheets("sheet1").Range("c4").Formula _
    = Workbooks("book1.xls").Worksheets("sheet1").Range("e6").Formula





    Thomas Wright wrote:
    >
    > when working out the details I often "perfect a formula in one workbook and
    > then paste it into another. However, I can not find a wyanot to paste the
    > formula with ref. to the first notebook. I then have to spend more time
    > deleting references. Its a bit of a hassle.
    >
    > Is there a way not to paste the ref. to the first workbook?
    >
    > Thanks
    >
    > Tom


    --

    Dave Peterson

  3. #3
    keepITcool
    Guest

    Re: paste formula without workbook reference


    this one will copy the formula 'absolute',change to Formular1c1 for
    relative copies.

    In this context I mean following with absolute..
    if you copy
    from test.xls sheet1 a3 =sheet3!b6
    to demo.xls sheet2 b6

    you'll get =sheet3!b6

    relative copy would get you =sheet3!c9

    if you select more than 1 cell the destiantion.selection is
    automatically resized.. neat!!!


    Sub GetFormula()
    Dim r As Range
    On Error Resume Next
    'turn off alerts in case sheet references are invalid
    Application.DisplayAlerts = False
    Set r = Application.InputBox("Select cell with Formula", Type:=8)

    If Not r Is Nothing Then
    Selection.Resize(r.Rows.Count, r.Columns.Count).Formula = r.Formula
    End If
    Application.DisplayAlerts = True

    End Sub

    have fun...



    --
    keepITcool
    | www.XLsupport.com | keepITcool chello nl | amsterdam


    Thomas Wright wrote :

    > when working out the details I often "perfect a formula in one
    > workbook and then paste it into another. However, I can not find a
    > wyanot to paste the formula with ref. to the first notebook. I then
    > have to spend more time deleting references. Its a bit of a hassle.
    >
    > Is there a way not to paste the ref. to the first workbook?
    >
    > Thanks
    >
    > Tom


+ 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