hello
is it possible to select or color a certain type of formulas within a range.
can i select all cells in a range containing a sum formula or just the cells containing average formula.
thanks
hello
is it possible to select or color a certain type of formulas within a range.
can i select all cells in a range containing a sum formula or just the cells containing average formula.
thanks
moshe
Not without a ton of work I think.
Wasn't THAT much work!
[VBA]Sub Test()
Dim c As Range
For Each c In Selection
If UCase(Mid(c.Formula, 1, 4)) = "=SUM" Then
With c.Interior
.ColorIndex = 36
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
End If
Next c
End Sub[/VBA]
That is because you are being too simplistic.
What about
=IF(A1=17,VLOOKUP(A1,M1:N20,2,FALSE),SUM(A1:A20))
that's a SUM formula in my book, and I can think of loads far mor complex than that. And if you just check for SUM rather than =SUMm, how about
=IF(A1=10,"SUMMARY DATA","")
and we haven't even started on the other functions yet.