Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
count of rows
I am creating an excel file programatically. Assume I added 10 rows. I need to write VBA code to see the count of rows in the excel file. How do I get this. There is a hidden list in the excel file with 500 rows or so. I do not want the count to reflect these rows. I only want the count for the 10 rows that I added. how is it done? Would having hidden rows for validation make a difference to the count of rows? -- kpriyac ------------------------------------------------------------------------ kpriyac's Profile: http://www.excelforum.com/member.php...o&userid=37535 View this thread: http://www.excelforum.com/showthread...hreadid=573206 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
count of rows
Set rng = Intersect(Rows.SpecialCells(xlCellTypeVisible), _
Rows("1:" & Rows.SpecialCells(xlCellTypeLastCell).Row)) MsgBox rng.rows.count -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "kpriyac" wrote in message ... I am creating an excel file programatically. Assume I added 10 rows. I need to write VBA code to see the count of rows in the excel file. How do I get this. There is a hidden list in the excel file with 500 rows or so. I do not want the count to reflect these rows. I only want the count for the 10 rows that I added. how is it done? Would having hidden rows for validation make a difference to the count of rows? -- kpriyac ------------------------------------------------------------------------ kpriyac's Profile: http://www.excelforum.com/member.php...o&userid=37535 View this thread: http://www.excelforum.com/showthread...hreadid=573206 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
count count multiple rows | Excel Discussion (Misc queries) | |||
Count all rows in column with data, Except rows 1-5 | Excel Worksheet Functions | |||
Count number of rows, where non relevant rows are hidden | Excel Discussion (Misc queries) | |||
Count rows and insert number to count them. | Excel Discussion (Misc queries) | |||
Why does rngDataSource.Rows.Count = 65536 when worksheet Rows=95? | Excel Discussion (Misc queries) |