View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Count Cells with Text Only

One way:

Dim nCount As Long
On Error Resume Next
nCount = Selection.SpecialCells( _
Type:=xlCellTypeConstants, _
Value:=xlTextValues).Count
On Error GoTo 0
MsgBox "Number of Text Values: " & nCount



In article .com,
wrote:

Does anyone know of a VBA code that I can use that will count the
number of cells in a selected column that contain text only, no blanks
or formulas? Thank you.