How to keep formulas constant

  • Thread starter Thread starter peteinchina
  • Start date Start date
P

peteinchina

I have a spreadsheet which runs a macro that performs a web query. The
macro copies the relevant data from the website and inserts it into a
new column on the spreadsheet - column E in this case. Thus, the old
data is shifted to column F. Now, I want column D to contain a formula
which simply calculates the difference between the new data and the
old, say =E6-F6 for the data in row 6. However even using absolute
references, when the new column is inserted, my column D formulas
change from =$E6-$F6 to =$F6-$G6.

How do I keep the formulas from changing when the new column is
inserted?

Many many thanks for any help on this one.
 
Genius!! Of course I need an indirect function! I'd forgotten about
them!

=INDIRECT("E"&ROW())-INDIRECT("F"&ROW())

Now I can copy it down all my rows :D

Thanks Biff!!!! You've just cured my headache!!!!!
 
Thanks for all the advice Biff.

It's working perfectly now - just the way I had envisioned from the
outset. Which is refreshing!!

You're a good man, and this is a damn good group!

Cheers!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top