Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Count formulas

23 views
Skip to first unread message

Hans Knudsen

unread,
Nov 13, 1999, 3:00:00 AM11/13/99
to
Hello
About a year ago I got an answer from John Walkenbach which included the
following one-liner (thanks John if you are out there somewhere)

Sub CountFormulas()
MsgBox ActiveCell.SpecialCells(xlCellTypeFormulas, 23).Count
End Sub

It works fine, but I have come to wonder if it is possible somehow to count
also conditional formatting formulas. I have looked in Visual Basic Help on
SpecialCells Method, but I can't make out what to do.

Regards
Hans Knudsen

David Hager

unread,
Nov 13, 1999, 3:00:00 AM11/13/99
to
Try using the xlAllFormatConditions constant for the Value argument.

David Hager
MVP - Microsoft Excel
Baton Rouge, La.

Hans Knudsen wrote in message <80ivla$aj0$1...@news.inet.tele.dk>...

Bob

unread,
Nov 13, 1999, 3:00:00 AM11/13/99
to
replace xlcelltypeformulas with
xlCellTypeAllFormatConditions, or I believ you can change the 23 to 235,
give it a try.

Hans Knudsen wrote:
>
>
> Hello
> About a year ago I got an answer from John Walkenbach which included the
> following one-liner (thanks John if you are out there somewhere)
>
> Sub CountFormulas()
> MsgBox ActiveCell.SpecialCells(xlCellTypeFormulas, 23).Count
> End Sub
>
> It works fine, but I have come to wonder if it is possible somehow to
count
> also conditional formatting formulas. I have looked in Visual Basic Help
on
> SpecialCells Method, but I can't make out what to do.
>
> Regards
> Hans Knudsen
>
>


--
Posted via CNET Help.com
http://www.help.com/

0 new messages