Determine if cell contains formula or number / value?

redhots4

Board Regular
Joined
Aug 30, 2004
Messages
136
Office Version
  1. 365
Platform
  1. MacOS
Is there a formula that determines if a cell contains a number or a formula? A2+4 would return TRUE, 6 would return FALSE, for example.

Ideas?
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
You can do it with a custom function:
Code:
Function IsFormula(Target As Range) As Boolean
    IsFormula = False
    
    If Left(Target.FormulaR1C1, 1) = "=" Then IsFormula = True
End Function

Place this in a new code module (Alt+F11, Insert | Module, and Paste. Then Alt+Q to return to Excel.
To use the function, type =IsFormula(A1) -- you will get TRUE or FALSE. You can fill the formula down as required.

If instead, you just want to go to all cells containing formulas, try Edit | Go To | Special | Formulas

Denis
 
Upvote 0

Forum statistics

Threads
1,214,989
Messages
6,122,622
Members
449,093
Latest member
catterz66

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top