Thread: Reusing formula
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Mark K. Mark K. is offline
external usenet poster
 
Posts: 8
Default Reusing formula

Thanks for that explanation, Never really understood this - was always
concerned about relative references and had never bothered to test it
out. Will save me a bit of work, that's for sure.

Cheers

Tony29 wrote:
Thank you - this is helpful. I hadn't realised that one can be a bit
cleverer in the definition of a defined name so that it is a value rather
than simply a cell which contains the value - the value being the actual
formula in this case, including relative cell references.

1. Select the cell containing the formula
2. copy the formula (Ctrl-c) from the formula bar
3. Insert/Name/Define...
4. Name the formula, eg. "MyFormula"
5. Paste (Ctrl-V) the formula into "Refers to:"
6. Click Add

7. In additional cells requiring the same formula enter "=MyFormula"

8. When the formula changes due to redesign, simply go to
Insert/Name/Define, select MyFormula and change its value in the "Refers to:"
field

"Arvi Laanemets" wrote:

Hi

Define a named formula, so that its returned value depends on address of
cell, it is called from. An example:
Create a named formual (InsertNameDefine)
MyFormula=ROW()*Sheet1!$A$1+COLUMN()*Sheet1!$B$1;
Into range A1:B1 on Sheet1, enter some values;
In any sheet, into some cell enter the formula
=MyFormula
Copy the cell with this formula to some range - you get some values;
Now change your named formula definition to
=POWER(ROW(),Sheet1!$A$1)+POWER(COLUMN(),Sheet1!$B $1)
All return values for formula =MyFormula do change at once.

Another option is to write an UDF, but I'm not sure it'll be possible.


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )



"Tony29" wrote in message
...
I know you can "reuse" a formula by copy/paste to a new cell and the
relative/absolute characteristics of the formula will be preserved. BUt
this
means that if the formula needs to change then I have to look for all
places
to which it was previously copied and carry out the copy/paste again -
tedious and error prone.

I want to enter a formula once only (eg. in the column heading above where
the formula will be used). Somewhere else in the sheet I want to say "use
the formula provided in cell R,C" and adopt the relative and absolute
references inherent in that formula.

For example ... =USE($H$1) would be a nice function

Can this be done?

An extension of this would be to reuse not only the formula of the
referred
cell, but to also reuse some other characteristics of the referred cell

For example ... =USE($H$1,"format"&"conditional format")

Can this be done?