Friday, May 1, 2015

Counting Excel sheets and rows

To count the number of individual sheets in an Excel workbook using VBA

[Excel 2010] Go to VBA, by pressing ALT + F11. Activate the Immediate window by Pressing CTRL + G

Enter the following line and press enter.

?activeworkbook.Sheets.Count


To count number of rows in a named worksheet enter the following:

?Sheets("Sheet1").UsedRange.Rows.Count



The total number of rows across an entire Excel workbook can also be calculated using VBA. But this is how to do it using Perl.


1 comment:

jane holly said...

This professional hacker is absolutely reliable and I strongly recommend him for any type of hack you require. I know this because I have hired him severally for various hacks and he has never disappointed me nor any of my friends who have hired him too, he can help you with any of the following hacks:

-Phone hacks (remotely)
-Credit repair
-Bitcoin recovery (any cryptocurrency)
-Make money from home (USA only)
-Social media hacks
-Website hacks
-Erase criminal records (USA & Canada only)
-Grade change
-funds recovery

Email: onlineghosthacker247@ gmail .com