Sunteți pe pagina 1din 1

HACK

#74 Move Relative Formulas Without Changing References

tax rate. You could add some descriptive text to the formula using Excel’s N
function:
=SUM($A$1:$A$10,N("Values for April"))*$B$1+N("Tax Rate for April")

Now you can determine what the formula is being used for simply by select-
ing this cell and looking in the Formula bar. The N function always will
return a value of 0 for any text, and so does not interfere with the formula’s
result in any way.

H A C K Move Relative Formulas Without Changing


#74 References Hack #74

In Excel, a formula reference can be either relative or absolute. Sometimes,


however, you might want to reproduce the same formulas somewhere else in
your worksheet or workbook, or on another sheet.

When a formula needs to be made absolute, type $ (a dollar sign) in front of


the column letter and/or row number of the cell reference, as in $A$1 (or
you can use the F4 key (c-T on the Mac) to toggle through the different
types of reference style). Once you do this, no matter where you copy your
formula, it will reference the same cells.
Sometimes, however, you might set up a lot of formulas that contain not
absolute references, but relative references. You would usually do this so
that when you copy the original cell formula down or across, the row and
column references change accordingly.
Yet other times you might set up your formulas using a mix of relative and
absolute references, and you want to reproduce the same formulas in
another range on the same worksheet, another sheet in the same workbook,
or perhaps another sheet in another workbook.
You can do all these things without changing any range references inside the
formulas by following these steps:
1. Select the range of cells you want to copy.
2. Go to the Home tab and choose Editing ➝ Find & Select ➝ Replace
(pre-2007, Edit ➝ Replace…).
3. In the Find What: box, type = (an equals sign).
4. In the Replace With: box, type & (an ampersand), or any other symbol
you are sure is not being used in any of the formulas.
5. Make sure the “Match Entire cell contents” option is not enabled, and
click Replace All.
6. All the formulas will appear on your worksheet with an & in place of an
=, so you can now copy your cells to any locations you wish.

194 | Chapter 6, Hacking Formulas and Functions

S-ar putea să vă placă și