Here's a nifty macro that some kind folks in the group gave me some time
ago........it works super.
(watch out for email word-wrap)
Vaya con Dios,
Chuck, CABGx3
Public Sub IDFormulae()
Dim response As Variant
response = Application.InputBox("Identify Cells containing formulas with:" &
_
vbNewLine & "1 - Red Border" & vbTab & _
vbTab & "5 - Blue Background" & _
vbNewLine & "2 - Blue Border" & vbTab & _
vbTab & "6 - Green Background" & _
vbNewLine & "3 - Green Border" & vbTab & _
vbTab & "7 - Clear Border Color" & _
vbNewLine & "4 - Yellow Background" & _
vbTab & "8 - Clear Background Color", _
Title:="Format Formulas as follows:", Type:=1)
If response = False Then Exit Sub
On Error Resume Next
With ActiveSheet.Cells.SpecialCells(xlCellTypeFormulas)
Select Case response
Case 1
.Borders.ColorIndex = 3 'sets Borders Red
.Borders.Weight = xlThick 'makes Borders thick
Case 2
.Borders.ColorIndex = 5 'sets Borders Blue
.Borders.Weight = xlThick 'makes Borders thick
Case 3
.Borders.ColorIndex = 4 'sets Borders green
.Borders.Weight = xlThick 'makes Borders thick
Case 4
.Interior.ColorIndex = 36 'sets background yellow
Case 5
.Interior.ColorIndex = 34 'sets Background lite blue
Case 6
.Interior.ColorIndex = 35 'sets Background lite green
Case 7
.Borders.ColorIndex = xlColorIndexNone 'clears Borders set by
above
Case 8
.Interior.ColorIndex = xlColorIndexNone 'clears Backgrounds set
by above
Case Else
MsgBox "Not a valid option"
' Note that clearing Borders or Backgrounds in Cases 7 & 8
' only clears those which were set by this macro and does not
' affect other borders or backgrounds elsewhere on the sheet
End Select
End With
On Error GoTo 0
End Sub
J. Avelar said:
Hi,
How can one determine if a cells contais a value or a formula? I'm
trying