Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional Formatting - identify formulas vs numbers 1

Status
Not open for further replies.

Brandos

Technical User
Apr 7, 2001
4
GB

In Excel, I want to apply Conditional Formatting to a range of cells. I want to distinguish between cells that contain a formula, and those that have been overtyped with a number.

Any ideas, anyone? Cheers..
 
This will require code, I believe. I recorded this:

Sub Macro1()
Columns("A:C").Select
Selection.SpecialCells(xlCellTypeConstants, 23).Select
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Range("A1").Select
End Sub

It selects Columns A, B, and C and finds the cells that contains values, not formulas, and makes them yellow.

You find the constants by hitting Edit-Goto, hit the Special button and then hit the Constants button (note the other choices under there also).

So if you can figure out how to find your constants, and you can figure out how to record a macro and put a button for it on the toolbar, you should be able to do this.

Perhaps you want it to be dynamic? This will require a Worksheet change event macro. In other words, someone who can write code (not just record it).

Let us know.
techsupportgirl@home.com
Brainbench MVP for Microsoft Word at
 
Thanks a lot - that worked a wonder!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top