LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Pulling out comments with macro

Replace the below part in the same macro suggested by Jim////

If Not rngComments Is Nothing Then
For Each rng In rngComments
MsgBox rng.Address & vbCrLf & rng.Comment.Text
Next rng
End If

with..

Dim lngRow as Long
If Not rngComments Is Nothing Then
For Each rng In rngComments
lngRow = lngRow + 1
Sheets("Comments").Range("A" & lngRow) = rng.Comment.Text
Next rng
End If

This will extract all comments to Col A of a sheet named 'Comments'. Create
a sheet named 'Comments' and try

If this post helps click Yes
---------------
Jacob Skaria


"dwake" wrote:

Is there a way to pull it out and put it in a blank cell as opposed to a
message box?

"Jim Thomlinson" wrote:

A macro will do it...

Public Sub WhatEver()
Dim rngComments As Range
Dim rng As Range

On Error Resume Next
Set rngComments = ActiveSheet.Cells.SpecialCells(xlCellTypeComments)
On Error GoTo 0

If Not rngComments Is Nothing Then
For Each rng In rngComments
MsgBox rng.Address & vbCrLf & rng.Comment.Text
Next rng
End If
End Sub
--
HTH...

Jim Thomlinson


"dwake" wrote:

okay, so I am looking at a spreadsheet (not created by me) and I need to pull
out some information in the spreadhseet. The problem is they put all the
information in comment field instead of putting them in rows. the
spreadsheet is built with each column being 1 month, and when there is an
action done in that month, they put all the information in the comments
field. The comments field is standardized. Can I create something to go in
and pull all the information out of each comments field that is spread across
4 years?

 
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
Macro to gather comments Scott@CW Excel Discussion (Misc queries) 4 March 14th 07 04:43 PM
Pulling Comments out of a Survey Scott@CW Excel Discussion (Misc queries) 6 February 1st 07 10:01 PM
Toggle comments on or off macro Jim G Excel Discussion (Misc queries) 3 October 5th 06 04:07 AM
macro to insert comments? darkwood Excel Discussion (Misc queries) 5 January 31st 06 08:00 PM
Macro pulling data from 2 worksheets billrl34 Excel Discussion (Misc queries) 2 December 12th 05 08:50 PM


All times are GMT +1. The time now is 10:58 PM.

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

About Us

"It's about Microsoft Excel"