Wednesday 15 April 2015

Checking the sheet for Formula and Highlight with Yellow


Sub chkformula()

 
Dim rng1 As Range

 
For Each rng1 In ActiveSheet.UsedRange

 
If rng1.HasFormula Then

 
rng1.Interior.Color = vbYellow

 
End If

 
Next rng1

 

End Sub

 

 

Or

 'create function by inserting the below code in module 

Function contain_fromula(actcell As Range)

contain_fromula = actcell.HasFormula

End Function

No comments:

Post a Comment