Capture a worksheet in VBA
A code writer
Dim cell As Range
For Each cell In ActiveSheet.UsedRange
If cell.HasFormula Then
Debug.Print "Range(""" & cell.Address & _
""").Value = Evaluate(""" & Replace(cell.Formula, """",
"""""") & """)"
End If
Next cell
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"Madiya" wrote in message
ps.com...
Thank you for your reply.
But this essancially means that I write Evaluate statement for each of
these 300+ cells which is very tedius. That's the reason I was
requesting for some automated VBA code
which will pick up formula in each cell and when I run the code, it
will put the same formula in the same cell.
Regards,
Madiya
Bob Phillips wrote:
Just use the same formulae in an Evaluate statement. Slow and
inefficient,
but should work.
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"Madiya" wrote in message
ups.com...
Hi all,
I have a huge worksheet full of sumproduct formulas which fatches
links
from various other files and creats summary reports.I do not want to
reveal formulas I have used which will be used against me (directly or
indirectly). Manually creating VBA code for the same for more then 300
formulas is quite tedius.
Is there a way by which I can capture the status of the whole sheet
(all formulas and links) in VBA which can be used later to creat the
sheet again when required?
Regards,
Madiya
|