+ Reply to Thread
Results 1 to 5 of 5

changing multiple cells from relative to absolute reference

  1. #1
    Mike
    Guest

    changing multiple cells from relative to absolute reference

    Is it possible to change a large range of very complex formulas from relative
    reference to absolute reference. Something other than the replace command?

    thanks, Mike

  2. #2
    JulieD
    Guest

    Re: changing multiple cells from relative to absolute reference

    Hi Mike

    one option that might work if the cell references you want to replace are
    used multiple times and that is to use range names, for example if you have
    the formulas
    =A1*A2
    =A1*A5
    =A1+A10
    and you now want to make A1 absolute, select A1, click in the name box (box
    to left of formula bar above column A) and type a name for the range e.g.
    Rng_A1
    and press ENTER (v. important)
    now choose

    insert / name / apply and click ok

    you will end up with
    =Rng_A1*A2
    =Rng_A1*A5
    =Rng_A1+A10

    and range names are absolute references.

    Please test this on a copy of your workbook first to see if it achieves what
    you want.

    Cheers
    JulieD


    "Mike" <Mike@discussions.microsoft.com> wrote in message
    news:3CB541E1-8A7B-4BD3-B45D-D117D2270350@microsoft.com...
    > Is it possible to change a large range of very complex formulas from
    > relative
    > reference to absolute reference. Something other than the replace command?
    >
    > thanks, Mike




  3. #3
    Chip Pearson
    Guest

    Re: changing multiple cells from relative to absolute reference

    You can do it with the following macro:

    Sub ChangeFormulas()
    Dim Rng As Range
    For Each Rng In Range("A1:A10").SpecialCells(xlCellTypeFormulas)
    If Rng.HasArray Then
    Rng.FormulaArray = Application.ConvertFormula( _
    fromreferencestyle:=xlA1, Formula:=Rng.Formula,
    toabsolute:=True)
    Else
    Rng.Formula = Application.ConvertFormula( _
    fromreferencestyle:=xlA1, Formula:=Rng.Formula,
    toabsolute:=True)
    End If
    Next Rng
    End Sub


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com






    "Mike" <Mike@discussions.microsoft.com> wrote in message
    news:3CB541E1-8A7B-4BD3-B45D-D117D2270350@microsoft.com...
    > Is it possible to change a large range of very complex formulas
    > from relative
    > reference to absolute reference. Something other than the
    > replace command?
    >
    > thanks, Mike




  4. #4
    Mike
    Guest

    Re: changing multiple cells from relative to absolute reference

    Chip, thanks for the macro, i'll give it a shot.

    "Chip Pearson" wrote:

    > You can do it with the following macro:
    >
    > Sub ChangeFormulas()
    > Dim Rng As Range
    > For Each Rng In Range("A1:A10").SpecialCells(xlCellTypeFormulas)
    > If Rng.HasArray Then
    > Rng.FormulaArray = Application.ConvertFormula( _
    > fromreferencestyle:=xlA1, Formula:=Rng.Formula,
    > toabsolute:=True)
    > Else
    > Rng.Formula = Application.ConvertFormula( _
    > fromreferencestyle:=xlA1, Formula:=Rng.Formula,
    > toabsolute:=True)
    > End If
    > Next Rng
    > End Sub
    >
    >
    > --
    > Cordially,
    > Chip Pearson
    > Microsoft MVP - Excel
    > Pearson Software Consulting, LLC
    > www.cpearson.com
    >
    >
    >
    >
    >
    >
    > "Mike" <Mike@discussions.microsoft.com> wrote in message
    > news:3CB541E1-8A7B-4BD3-B45D-D117D2270350@microsoft.com...
    > > Is it possible to change a large range of very complex formulas
    > > from relative
    > > reference to absolute reference. Something other than the
    > > replace command?
    > >
    > > thanks, Mike

    >
    >
    >


  5. #5
    Mike
    Guest

    Re: changing multiple cells from relative to absolute reference

    JulieD, that is a very good idea. Unfortunately, there are to many different
    cells involved.

    Mike


    "JulieD" wrote:

    > Hi Mike
    >
    > one option that might work if the cell references you want to replace are
    > used multiple times and that is to use range names, for example if you have
    > the formulas
    > =A1*A2
    > =A1*A5
    > =A1+A10
    > and you now want to make A1 absolute, select A1, click in the name box (box
    > to left of formula bar above column A) and type a name for the range e.g.
    > Rng_A1
    > and press ENTER (v. important)
    > now choose
    >
    > insert / name / apply and click ok
    >
    > you will end up with
    > =Rng_A1*A2
    > =Rng_A1*A5
    > =Rng_A1+A10
    >
    > and range names are absolute references.
    >
    > Please test this on a copy of your workbook first to see if it achieves what
    > you want.
    >
    > Cheers
    > JulieD
    >
    >
    > "Mike" <Mike@discussions.microsoft.com> wrote in message
    > news:3CB541E1-8A7B-4BD3-B45D-D117D2270350@microsoft.com...
    > > Is it possible to change a large range of very complex formulas from
    > > relative
    > > reference to absolute reference. Something other than the replace command?
    > >
    > > thanks, Mike

    >
    >
    >


+ 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