I have some sort of data on my excel sheet in 30 rows. Let say A1 to A30.
Here some rows were hidden. Let say A5 to A8 totally 4 rows were hidden. I just want to count the number of rows except hidden rows.
I just tried the following code.
VB Code:
MsgBox ActiveSheet.UsedRange.Rows.Count
This code counts the all row which are used in active sheet. The above code gives the answer 30. but my answer should be 26 not 30.
Thanks in advance!
CS.




Reply With Quote