Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this. This will give you the last column/row filled. If you are looking
for values then try with WorkSheetFunction.COUNTIF For Col = 3 to ActiveSheet.Cells(2, Columns.Count).End(xlToLeft).Column Cells (1, Col) = ActiveSheet.Cells(Rows.Count, Col).End(xlUp).Row Next 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Counting non-blank cells in a column, excluding hidden rows | Excel Worksheet Functions | |||
Counting rows in a column | Excel Discussion (Misc queries) | |||
Counting rows, then counting values. | Excel Discussion (Misc queries) | |||
Counting Rows Then Counting Values in Columns | Excel Programming | |||
counting non-empty rows in a column | Excel Programming |