LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Counting rows in a column

Sorry the below is a wrong post....not related to the subject

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

I see 2 reasons.

1. Out of the below check where you have written your code.

Private Sub Workbook_SheetCalculate(ByVal Sh As Object)
'This Workbook event will be triggered for all sheets
End Sub

Private Sub Worksheet_Calculate()
'Each individual sheet has got its own Calculate event which will be
triggered only for that sheet
End Sub

2. Check the sheet reference used in your code. Check whether you have
specified ActiveSheet or Sheets(1) or ...

If this post helps click Yes
---------------
Jacob Skaria


"Sören_Marodören" wrote:

Hi,

I use the following line to count rows in a column A
Rows = Range("A" & Rows.Count).End(xlUp).Row
(I dont't know if this is the best way, but it works.)

Now I want to have a for loop that goes from column C to the last column
and count the number of rows in every column.

For Col = 3 to Last_Col
Rows = ....
Cells (1, Col) = Rows
Next

How shall the Row = ... be written to count the number of rows in column Col?
How can it be written to count columns in another worksheet?


Best regards,
/Sören Nilsson
Sweden

 
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
Counting non-blank cells in a column, excluding hidden rows SisterDell Excel Worksheet Functions 3 June 1st 07 03:31 PM
Counting rows in a column Mar Excel Discussion (Misc queries) 2 December 5th 05 09:23 PM
Counting rows, then counting values. Michael via OfficeKB.com Excel Discussion (Misc queries) 7 August 4th 05 10:57 PM
Counting Rows Then Counting Values in Columns Michael via OfficeKB.com Excel Programming 1 June 1st 05 04:10 PM
counting non-empty rows in a column Fede Querio Excel Programming 1 July 19th 03 05:57 PM


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

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"