Count.Comments

pfergy

New Member
Joined
Feb 24, 2014
Messages
2
Is there a way for me to see the number of comments in a workbook by viewing the file properties only? I would like to have a column in the SharePoint library that shows the number of comments for the workbook. Thoughts? Thanks!
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hi pfergy - I'm not sure how to do this by looking at the properties, but if you follow the instructions in the comments of the code below and then run the macro the highlighted cells with comments will be counted and the number will show up in the MsgBox. Hope this helps.

Code:
Sub pfergy_SelectionCount()
'Go to Find & Select and choose "Comments"
'This will highlight all cells with comments
'Run this macro and the count will show up in the MsgBox
Dim count As Integer
count = Selection.count
MsgBox (count)
End Sub
 
Upvote 0
pfergy - re file properties the "comments" in file properties are not the same thing as comments in cells the file propery comment is an optional comment about the workbook as a whole


you can use macro below to show total comments in a workbook ( the MsgBox ws.Name & " has " & ws.Comments.count line in the loop gives a meesage , worksheet by worksheet of # commnets in that worksheet
I have this commneted out at the moment - if you wantto see a worksheet by worksheet count, uncomment this line )

Sub how_many_comments()
Dim ws As Worksheet
Dim tot_comments As Long
tot_comments = 0
For Each ws In ActiveWorkbook.Worksheets
'MsgBox ws.Name & " has " & ws.Comments.count
tot_comments = tot_comments + ws.Comments.count

Next ws
MsgBox "total comments " & tot_comments
End Sub
 
Upvote 0

Forum statistics

Threads
1,216,083
Messages
6,128,718
Members
449,465
Latest member
TAKLAM

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top