Formula to indentify if a cell contains a formula?

DanD

Board Regular
Joined
Dec 23, 2008
Messages
124
I've a spreadsheet in which a selection of cells between A1 and BC5 should contain a formula, is it posible to create a conditional format or cell(or multiple cells) to confirm if the range contains formulas in each cell

Thanks

Dan
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
You can use the below user-defined function:

Function Equals_Formula(myrange As Range)
Equals_Formula = myrange.HasFormula
End Function

Your CF formula applied to each cell in the range would be:
equals_formula(A1)=TRUE

Or you could enter the following formula into an empty cell:
=equals_formula(A1:BC5)

If all cells contain a formula, this will return TRUE. If they all contain values, it will return FALSE. If they contain a combination of formulae and values, it will return 0.
 
Upvote 0
Very neat solution, I was hoping for a solution that didn't involve VBA but this is a perfect alternative.
 
Upvote 0
Glad to help, thanks for the feedback.

I've tried without success to find a non-VBA approach, which is why I devised this.
 
Upvote 0
A couple of other options

My Mappit! addin maps files to highlight potential inconsistencies in changing formulae, hardcoded cells etc. So it will show graphically in a separate file which cells are formulae or not

You can use XLM with conditional formatting to highlight formulas, see David Hager's solution
Cheers

Dave
 
Upvote 0
Using Ctrl + `(grave accent) is the toggle that shows them all and hides them all.

HTH

Mel
 
Upvote 0

Forum statistics

Threads
1,224,568
Messages
6,179,572
Members
452,927
Latest member
whitfieldcraig

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