The information in this article applies to:
SUMMARY
In 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:
Q116028 XL5: VB Macro to Change Between Relative/Absolute References MORE INFORMATION
The following is a description of different reference types:
The 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:
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 Additional query words: 2.2 2.20 4.00a
Keywords : |
Last Reviewed: March 21, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |