Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do I, programmatically, determine whether a specific
cell contains a formula or a number? I have written something like this .... CellContents = ActiveCell.Formula MsgBox CellContents .... This shows the cellcontents in the messagebox, but I cannot find out how to have the macro to determine whether or not this is a formula. In this case, I want to delete the whole row if the cell content is a formula. Hope someone could help me with this problem. Stefan J |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Stefan,
Use the HasFormula property. This will return True if the cell contains a formula, or False if the cell does not contain a formula. E.g., If ActiveCell.HasFormula Then MsgBox "Formula" Else MsgBox "Not A Formula" End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Stefan J" wrote in message ... How do I, programmatically, determine whether a specific cell contains a formula or a number? I have written something like this ... CellContents = ActiveCell.Formula MsgBox CellContents ... This shows the cellcontents in the messagebox, but I cannot find out how to have the macro to determine whether or not this is a formula. In this case, I want to delete the whole row if the cell content is a formula. Hope someone could help me with this problem. Stefan J |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Determining the Age of a Person | Excel Worksheet Functions | |||
Determining the current row and col | Excel Discussion (Misc queries) | |||
need help with determining a formula | Excel Worksheet Functions | |||
birthdays - determining when due | Excel Discussion (Misc queries) | |||
Determining a Date | Excel Discussion (Misc queries) |