Formula or Value

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
2,347
Office Version
  1. 365
Platform
  1. Windows
Is there a way to do conditions based on if the cell has a formula in it or if its a value?

I want to be able to identify if someone overwrote a value in a cell with a hard value.

I am going to either use this in some VBA code (If statement) or just use conditional formating.

Thanks for the help!
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
I doubt it with a built-in formula, but if you're going to use vba you can have a udf:
Code:
Function hasformula(cll)
hasformula = cll.hasformula
End Function
and use it on the sheet thus:
Excel Workbook
DE
1823FALSE
1923TRUE
Sheet
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D181. / Formula is =hasFormula(D18)Abc
D191. / Formula is =hasFormula(D19)Abc


Excel Jeanie HTML isn't working for me tonight; D19 was highlighted on my sheet by conditional formatting - honest.

 
Upvote 0
Not sure how to follow. But I am going to do some research based on what you sent me.

Thanks for the start.
 
Upvote 0
One of the issues with using Conditional Formatting is to remember that if the user pastes something in a conditionbally formatted cell the CF is over-written.

Another way that may suit you is to simply select the column/range/cells where you expect to find the formulas then press F5 -> Special...|Constants|OK. If any formulas have been over-written with values those cells will be highlighted.

The above would not pick up if formulas have simply been deleted. However you could use the same process but select 'Formulas' instead of 'Constants' and look for any cells that become de-selected. Blanks and constants would be de-selected with this process.
 
Upvote 0

Forum statistics

Threads
1,225,852
Messages
6,187,397
Members
453,424
Latest member
rickysuwadi

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