Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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
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
count count multiple rows Lise Excel Discussion (Misc queries) 5 December 18th 08 04:41 AM
Count all rows in column with data, Except rows 1-5 Gregory Day Excel Worksheet Functions 4 March 27th 08 02:58 PM
Count number of rows, where non relevant rows are hidden Pieter Excel Discussion (Misc queries) 2 November 8th 06 12:24 PM
Count rows and insert number to count them. Mex Excel Discussion (Misc queries) 6 August 23rd 06 02:29 AM
Why does rngDataSource.Rows.Count = 65536 when worksheet Rows=95? [email protected] Excel Discussion (Misc queries) 12 July 22nd 05 12:50 PM


All times are GMT +1. The time now is 12:31 AM.

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

About Us

"It's about Microsoft Excel"