View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
somethinglikeant somethinglikeant is offline
external usenet poster
 
Posts: 94
Default Counting in a variable range

Select the range you wish to count in

run this procedure to display a messagebox with the result

:======================================

Sub CountInSelection()

MsgBox Application.WorksheetFunction.CountIf(Selection, "Standard")

End Sub

:======================================

else declare a variable to th result and use as you wish. Let me know
if you need any more help for you use.

http://www.excel-ant.co.uk