Excel: Changing from Absolute to Relative or Mixed ReferencesLast reviewed: May 1, 1995Article ID: Q64337 |
The information in this article applies to:
SUMMARYIn Microsoft Excel, you can create absolute, relative, or mixed references. You can easily change from one reference type to another without having to retype it by doing any of the following:
ARTICLE-ID: XL5: VB Macro to Change Between Relative/Absolute References TITLE : Q116028 MORE INFORMATIONThe following is a description of different reference types:
Type Example Description ---------------------------------------------------------- Absolute $A$1 Both the row and column are fixed Mixed A$1 Only the row is fixed Mixed $A1 Only the column is fixed Relative A1 Neither the row or column is fixedThe following describes the different types of cell references and the methods for changing them.
To Use the Reference Command or Keyboard ShortcutTo toggle from one reference type to another:
Each time you choose Reference from the Formula menu or use the keyboard shortcuts, Microsoft Excel cycles through the different types of reference. Using FORMULA.CONVERT() (Versions 3.0 and 4.0) FORMULA.CONVERT() can be used to change references to absolute, relative or mixed. To specify a reference type that you want a reference to change to, specify a value 1-4 for the To_Ref_Type argument. The following macro converts all formulas in a selected range to absolute references, specified by the number 1 in the FORMULA.CONVERT() function in cell A4. The worksheet must be in A1 notation for this macro to work. If your worksheet is in R1C1 style, change the TRUE parameter in FORMULA.CONVERT() to FALSE. Type the following macro beginning in cell A1 of a new macro sheet: A1: Formula Conversion A2: =FOR.CELL("CurrentCell",,TRUE) A3: =IF(ISERROR(SEARCH("=",GET.CELL(6,CurrentCell))),GOTO(A5)) A4: =FORMULA(FORMULA.CONVERT(GET.CELL(6,CurrentCell),TRUE,FALSE,1, CurrentCell),CurrentCell) A5: =NEXT() A6: =RETURN() To run the macro, select all of the formulas that need to be converted. The selection must be contiguous.
REFERENCES"User's Guide 1," version 4.0, page 142 "User's Guide," version 3.0, page 124 "Function Reference," version 4.0, page 170
|
KBCategory: kbusage
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |