How can I detect cells that contain formulas

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to use VBA to detect which cells on a worksheet contain formulas
(rather than hard numbers) and then I need to copy the text of those formulas
to another worksheet. This is part of a "Scenario" manager I am building.

Thanks for your help,

Al London, CPA
 
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=Fals
 
activecell.hasformula

and

activecell.formula

should get you started

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
First copy 'm all then clear the constants


On Error Resume Next
Range("a10:z40").SpecialCells( _
xlCellTypeConstants).ClearContents
on error goto 0

you can forget about the on error if you're SURE your
original has them..


keepITcool

< email : keepitcool chello nl (with @ and .) >
< homepage: http://members.chello.nl/keepitcool >


=?Utf-8?B?QWwgTG9uZG9uLCBDUEE=?= wrote in message
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top