Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
KMH KMH is offline
external usenet poster
 
Posts: 31
Default If #REF! Use 0

I have a template that I have developed where the users sometimes want to
delete a column that is linked into some calculations that are used in a
sumproduct range.

Temporarily, I have locked them out of deleteing the column, but it should
be easy to write an If Formula to make this situation ok.

I would like to have those calculations be an IF statement of some sort that
will detect that the cell that is referenced is a #REF now and therefore just
use 0 rather than make everything that uses that sumproduct range go to a
#REF.

I have tried ISERROR(cellname) or ISREF(cellname), and they seem to work
fine in a cell by themselves changing from True to False, but when I put them
inside an IF statement or just reference that a cell that has that
calculation in it, it still doesn't work. Why?

I could also write a macro to just over write the existing formula, but how
do I detect that the cell is deleted. I could use a Worksheet_Change
subroutine but then what syntax should I use for the If statement to detect
that the cell has been deleted?

Thanks for any help.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"