View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Filo Filo is offline
external usenet poster
 
Posts: 54
Default Count the #of ISTEXT cells

It worked. Thank you!

"Cory" wrote:

Filo - give this a try. It counts the total number of cells and then
subtracts the number of cells that contain numbers.

Sub CountText()

Dim Count As Integer

Count = Range(ActiveCell, ActiveCell.End(xlToRight)).Cells.Count
Count = Count - WorksheetFunction.Count(Range(ActiveCell,
ActiveCell.End(xlToRight)))
MsgBox "There are " & Count & " cells containing text."

End Sub

-Cory

"Filo" wrote:

Could you help me with the VB code that would perform the following?

Count the number of cells that have text in a range that goes from the
active cell to .End(xlRight)

Thank you!