View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett
 
Posts: n/a
Default self-updating formula

The macro recorder is your friend. I just copied the formula in c2 down to
c6. So, create your formula in c2 and then execute. This can be modified to
make the selection for you based on the number of rows of data.
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 11/17/2005 by Don Guillett
'

'
Selection.AutoFill Destination:=Range("C2:C6"), Type:=xlFillDefault
Range("C2:C6").Select
End Sub
=========
Sub filldown1()
Range("c2").AutoFill _
Range("C2:C" & Cells(Rows.Count, "a").End(xlUp).Row)
End Sub

--
Don Guillett
SalesAid Software

"BorisS" wrote in message
...
It's not that problem (the one where once I add a row, the SUM, for
example,
doesn't work. I know about those tips. What I am saying is that I want
to
be able to enter a formula in one primary cell ("=A1+A2") and then have
other
cells that are in the same line as the primary formula (to where they'd
initially be the equivalent of "=B1+B2", "=C1+C2", etc.), and then when I
need to change the first one for some reason to "=A1+A2+A20", I'd like the
others to know that they need to follow suit and update themselves to be
"B1+B2+B20", etc.

In other words, I am trying to avoid having to do either of (the only two
ways I know of right now to accomplish the above):

1) highlighting all three target cells, entering the update to the formula
in one, and hitting ctrl-enter OR
2) updating the first one and then either dragging to others or
copy/pasting
to others

Simply said, I have sheets and frequency of updates that are so long and
so
often that it actually is annoying (if avoidable) to have to somehow or
other
end up selecting all the cells that I want to update. If there were some
way
that all cells that I wanted to have the same format of formula could
"link
into" the original formula, knowing that when that formula is updated, it
is
a sign that they are also supposed to be updated.

Hope that makes more sense. Thx.
--
Boris


"Don Guillett" wrote:

Have you tried inserting a row BEFORE your total formula?

--
Don Guillett
SalesAid Software

"BorisS" wrote in message
...
Is there a way to get a cell to basically do the same formula as a
preceding
cell, so that when the preceding cell's formula is updated, the
dependent
cell does the same formula? In other words, if I have a sum formula in
12
columns, and I modify one of them, I currently have to select all the
cells
and update the formula in each (even if we're talking about ctrl-enter
to
put
the same formula at once). But is there any way that the 11 cells
other
than
the first one can be written to basically, on their own, do a different
calculation when I alter that first cell's formula? If there are 12
columns,
it's obviously easy. But when you have a very long sheet and maybe
have
similar formulas in different places, selecting them all before
changing
and
ctrl-entering is annoying. Just not sure if someone else has come up
with
a
way to do this and I am missing out on an efficient way of updating
formulas.

Thx.

--
Boris