View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
David McRitchie David McRitchie is offline
external usenet poster
 
Posts: 903
Default Deleting rows without losing formulas

Hi John,
See Insert a Row using a Macro to maintain formulas
http://www.mvps.org/dmcritchie/excel/insrtrow.htm

A VERY important aspect of this is changing your formula to use
OFFSET so that you can insert, delete, sort rows.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"John Davies" wrote in message ...
Hi Lionel

That works fine, but if I want to insert a line, the formula recalculates
from the inserted point. Is there a way to delete and insert lines without
losing the format.

Also to be a pain, say that a column of cells has formulae that refer to a
lookup table e.g. a2=vlookup(e12,data,5), a3=vlookup(e13,data,5) etc is there
a way to delete and insert rows without losing the formulas in the next row.

Thanks for your help


"John Davies" wrote:

If I have a column of cells, say A1 to A15 with the values of A1=1,
A2=A1+1,A3=A2+1 etc, then if I want to delete say row A6, row A7 will show
the #REF! error. Is there a way to delete the row without losing the
formula in the next row?