Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rows Count of a particular column
Hi all,
Sorry for this stupid question. Is it possible to count the number o rows of a particular column? I wrote: 1) Worksheets("Settings").UsedRange.Columns(1).Rows.C ount 2) Worksheets("Settings").Columns(1).Rows.Count Neither works correctly. (first one gives 244, which it should give m 54 for the first column; second one gives 65536.) Thanks -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rows Count of a particular column
Dim lCol as Long, rng as Range
lCol = 1 With Worksheets("Settings") set rng = .Range(.Cells(1,lCol),.Cells(rows.count,lCol).end( xlup)) End With msgbox rng.rows.count -- Regards, Tom Ogilvy "kaon " wrote in message ... Hi all, Sorry for this stupid question. Is it possible to count the number of rows of a particular column? I wrote: 1) Worksheets("Settings").UsedRange.Columns(1).Rows.C ount 2) Worksheets("Settings").Columns(1).Rows.Count Neither works correctly. (first one gives 244, which it should give me 54 for the first column; second one gives 65536.) Thanks. --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rows Count of a particular column
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Count/Sum rows of a column depending on criteria from drop-down li | Excel Worksheet Functions | |||
Count NonBlank Rows with Criteria in another column | Excel Worksheet Functions | |||
Count all rows in column with data, Except rows 1-5 | Excel Worksheet Functions | |||
count rows in a column for looping | Excel Discussion (Misc queries) | |||
Count the number of rows where more than one column meets set crit | Excel Worksheet Functions |