View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Convert a UDF to it's value when copy sheet

If you're going to loop through the cells...

For Each c In d
With c
.Value = .Value
End With
Next c

could look more like:

For Each c In d
With c
If UCase(.Formula) _
Like UCase("*" & "=MID(CELL(""filename""," & "*") Then
'do nothing
Else
.Value = .Value
End If
End With
Next c

Make sure you include enough to check the correct formula.

Casey wrote:

Bob,
In my haste, I only verified that the formula worked, however it
appears to suffer the same malady as the UDF. It gives me a #VALUE
error. Something Dave said leads me to suspect that until the workbook
is saved the formula can't calc. That being said, using my code is
there way to exclude the "I3" cell from the conversion from formulas to
values or a way to insert the save process for the new workbook so the
formula will calculate and then do the conversion?

--
Casey

------------------------------------------------------------------------
Casey's Profile: http://www.excelforum.com/member.php...fo&userid=4545
View this thread: http://www.excelforum.com/showthread...hreadid=488205


--

Dave Peterson