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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional Formatting in Excel

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I want to check that a column contains only formula or blanks, ie. no text or manually typed numbers. Is it possible to achieve this with VB, with offending cells having text or background colour changed?
 
Hi Geoff,

Seed code to help you get started:

Dim cell As Range

For Each cell In Application.Selection
If Not cell.HasFormula Then
If Not IsEmpty(cell.Value) Then
cell.Interior.ColorIndex = 3
End If
End If

Next cell

Good luck.


IS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top