View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
David McRitchie David McRitchie is offline
external usenet poster
 
Posts: 903
Default Extracting formula instead of result from cell

Hi lithium81,
Debug statement results from VBA code appear on the Intermediate
window in the Visual Basic Editor (Ctrl+G).

For what you want I would suggest the use and flexibility of a
User Defined Function see GetFormula at
http://www.mvps.org/dmcritchie/excel...htm#getformula
if it is not obvious where the formula referenced actually is at,
then a variation GetFormulaD might work better for you.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Rowan Drummond" wrote in message ...
If you want it in a variable then:

dim strFml as string
strFml = range("A1").formula

Regards
Rowan

lithium81 wrote:
Hi,

Thanks! When I do the debug.print, I don't see any output, perhaps I am
using it the wrong way. Could someone help please?

Will this put the data into a variable?

Thanks!