Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Counting cells with data in them

Try this:

Sub count_filled()
Dim sectornum As Long
Dim rngX As Range
Dim lngX As Long

Range("D1", Range("D65536").End(xlUp)).Select
sectornum = Selection.Count
lngX = Application.WorksheetFunction.CountBlank(Selection )
MsgBox CStr(sectornum - lngX)
End Sub

Regards,
Wes
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
COUNTIF, only counting once if both cells contain the data Navy Luke Excel Worksheet Functions 5 December 2nd 08 10:26 PM
Counting Cells with same data pulling my hair out Excel Discussion (Misc queries) 3 November 21st 07 07:21 AM
Counting cells with multiple data Bob Smith Excel Worksheet Functions 3 November 1st 06 06:43 PM
Counting cells that contain data Karl Excel Discussion (Misc queries) 2 October 14th 06 07:18 PM
Counting cells with data jimbob Excel Discussion (Misc queries) 3 November 26th 05 11:00 PM


All times are GMT +1. The time now is 08:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"