View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Nicola M Nicola M is offline
external usenet poster
 
Posts: 9
Default Formula in Range

I'm sorry but I don't understand what you need exactly. Is a mistake that you
indicated you want the formula in the same cell which contains data (C5). If
it is not this should tp involve VBA code works on Selection_Change event.
Please write some else example.
Nicola M.

"Exceller" wrote:

I've checked the forum for posts relating to this solution but didn't find
any. I'm looking for code that would enter a simple variance formula against
two columns for as many values as there are in the two columns.

So, if I have in cell B5 a value of 200 and in cell C5 a value of 100, then
the value in C5 would be 100 (simple subtraction of values in column C from
values in column B). The condition is that the formula works for any two
columns preceding the cell that is selected. So, if cell F10 is selected,
for example, then the formula will begin in F10, subtracting E10 from D10, on
down the F column for as many values as there are in columns D and E.

Is this do-able? Thanks.