ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   cell value (https://www.excelbanter.com/excel-programming/281728-cell-value.html)

Tim[_29_]

cell value
 
How would I chec if a particular cell contains a formula
or value. If teh cell contains the value, I would like
to exit the sub, but if there is a formula I would like
the procedure to run.

Thanks in Advance

Ron de Bruin

cell value
 
Try this Tim

Sub test()
If Range("D6").HasFormula Then
MsgBox "formula"
Else
MsgBox "not"
End If
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Tim" wrote in message ...
How would I chec if a particular cell contains a formula
or value. If teh cell contains the value, I would like
to exit the sub, but if there is a formula I would like
the procedure to run.

Thanks in Advance





All times are GMT +1. The time now is 05:10 PM.

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