View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default #REF in formula when delenting source

Another is to use Indirect

=Indirect("Data!A1")

will refer to A1 even after row1 is deleted.

--
Regards,
Tom Ogilvy

"J Morrison" wrote in message
...

-----Original Message-----

-----Original Message-----
Hi.

I have done a macro that "uses" that creat PDF´s of a
workshseet (formated table). this formated table as is
source in another worksheet that as a 1000 record
database.

The problem is that, when i delete row 2 (so that the
valeu change in the "formated table") my links in the
other worksheet becomes #REF.

How stop #REF from appering?? i´ve tried manual
calculations baut i was no good....

Thanks´s a lot
SpeeD
.
when you delete the cells where the data comes from the

formula will also delete its reference to the cells. look
at using clear contents rather than delete or evluate

your
formulae before the deletion.
.
#######


You can also use the offset function in Excel, instead of
directly referring to the cell that will be deleted. Use
offset and make sure the reference cell is one that will
never be in a row that is deleted.