ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Formula (https://www.excelbanter.com/excel-programming/287771-formula.html)

Jenny

Formula
 
How would I use code to identify a formula (vs. a plain
input number) in a cell.

Thanks.

Chip Pearson

Formula
 
Jenny,

Use the HasFormula property. For example

If Range("A1").HasFormula = True Then
Debug.Print "range has formula"
Else
Debug.Print "range doesn't have formula"
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Jenny" wrote in message
...
How would I use code to identify a formula (vs. a plain
input number) in a cell.

Thanks.





All times are GMT +1. The time now is 02:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com