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 Setting Conditional Formulas



Tot = 0
for i = 1 to 4
set rng = nothing
on Error Resume Next
set rng = Range("Cell" & i)
on Error goto 0
if not rng is nothing then
tot = tot + rng * choose(i,var1,var2,var3,var4)
end if
Next

--
Regards,
Tom Ogilvy

"Wstohler" wrote in message
...
Thanks for the help,
The problem is that I'm using named ranges for Cell1, etc. And some might

be deleted. So if I try to add a named range that has already been deleted,
it will give me an error.

Any further ideas?