Contacts

You can contact me by email at: jpgpinto (at) gmail (dot) com

Would like to hear from you. If you have some comments or sugestions about this blog, feel free to send me an email. I'll try to answer as soon as possible.

6 comentários:

Parcsyde said...

Excel 2010
Dealing with Worksheets

I am trying to find a way to calculate the total number of "worksheets" within a Excel file. I want the number to be placed into a cell on one of the worksheets. My Excel would be something with multiple worksheets, and 2-3 of them would not be someting I want as part of my count, so I believe if I can just find out the total I could than subtract 2 or 3 from it to get my total worksheets that I am interested in.
Do you know how I can do this? Via a function in a cell or by VBA?

Thank you for your time,
Doug from New York

jppinto said...

Try this custom function. Use in any cell like

=SheetCount() for all Sheets

=SheetCount(True) for Worksheets only

VB:
Function SheetCount(Optional Worksheets_only As Boolean) As Long

If Worksheets_only = True Then
SheetCount = Worksheets.Count
Else
SheetCount = Sheets.Count
End If

End Function

Anonymous said...

Hello Mr. jppinto,

Thank you for you helpful blog.

I would ask if have an acount on twitter to teel us about your new post or send it by email.


Thank you,
Shroog

jppinto said...

Hello,

Don't have a Twitter account.

Regards,

João Pinto

Mani said...

Hi Blogger ,

I Want to Know that there is any Formula is There for Adding Auto Number after two blank Rows .
For Best Understanding i have given a link of image ..

Image Preview :- http://s2.postimage.org/k509mbfhl/sshot_1.png

As you have noted the numbers are on the url cells after two blank cells ..like that i want the forumal to enter it auto..Thank You in Advance ..

jppinto said...

This could be done only with VBA code.