Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Count items in a column

Hi All,

I am sure this is the easiest thing in the world, but I cannot find the
command.

I have about 20 columns, with random numbers of entries in each column. I
need a command to count the items in each column and store each count in a
seperate variable.

I have the loop setup and the variables, I just need the command to count
the items.

Thanks in advance,
Chad


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default Count items in a column

The following will store the count of the non blank cells for the first 20
columns of the active worksheet:

Dim myArray(1 To 20) As Integer
Dim I As Integer
For I = 1 To 20
myArray(I) = Application.CountA(Columns(I))
Next

Bob Flanagan
Macro Systems
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel

"Chad" wrote in message
...
Hi All,

I am sure this is the easiest thing in the world, but I cannot find the
command.

I have about 20 columns, with random numbers of entries in each column. I
need a command to count the items in each column and store each count in a
seperate variable.

I have the loop setup and the variables, I just need the command to count
the items.

Thanks in advance,
Chad



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Count items in a column

Thanks

"Chad" wrote in message
...
Hi All,

I am sure this is the easiest thing in the world, but I cannot find the
command.

I have about 20 columns, with random numbers of entries in each column. I
need a command to count the items in each column and store each count in a
seperate variable.

I have the loop setup and the variables, I just need the command to count
the items.

Thanks in advance,
Chad



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
Can you count items in a column by color? Jim N Excel Discussion (Misc queries) 1 March 30th 09 10:06 PM
SUMPRODUCT to count items with duplicates where another column contains two defined items PCLIVE Excel Worksheet Functions 4 September 8th 07 10:33 AM
How do I sort - and count - items in a column? VanS Excel Discussion (Misc queries) 1 December 21st 06 06:07 AM
How do I count the items in one column if another column is blank dereksmom Excel Worksheet Functions 1 November 8th 06 11:34 PM
Count number of items in one column that have a value in another? onthefritz Excel Worksheet Functions 5 December 10th 05 04:19 PM


All times are GMT +1. The time now is 12:40 PM.

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

About Us

"It's about Microsoft Excel"