VB.Net - retrieve actual formula string

G

Grant

Hi,

I am using VB.Net (Interop) to reference an Excel Workbook, and want to
retrieve the actual formula string rathar than the result of the formula.

So if the formula in Excel was =SUM(B5:B8) then the string I would want to
return would be "=SUM(B5:B8)"

I have tried almost every property but still can only seem to get the value.

Any help would be much appreciated.

Thanks in advance,

Grant.
 
J

Jim May

From the imediate Window (from an at-random file I have open)

? Activecell.Formula
=IF(ISBLANK(H7),0,IF(H7<=TODAY(),D7,0)) << Produces in text form

HTH
 

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

Top