Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Aleks
 
Posts: n/a
Default Export comments to new column

Hi,

I have an excel spreadsheet with over 2000 rows, the first column has some
text and most of the cells have 'comments'. I need to export this comments
to a new column. How can this be done without copy/pasting each one
individually ? (The column is to the right of the one that has the text and
comments).

Thanks

Alejandro


  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default Export comments to new column

Saved from a previous post:

You can retrieve the text from a comment with a userdefined function like:

Option Explicit
Function GetComment(FCell As Range) As Variant
Application.Volatile

Set FCell = FCell(1)

If FCell.Comment Is Nothing Then
GetComment = ""
Else
GetComment = FCell.Comment.Text
End If

End Function

Then you can use it like any other function:

=getcomment(a1)

But be aware that the function won't evaluate when you just change the comment.
It'll be correct when excel recalculates. (Hit F9 to force a recalc.)

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Aleks wrote:

Hi,

I have an excel spreadsheet with over 2000 rows, the first column has some
text and most of the cells have 'comments'. I need to export this comments
to a new column. How can this be done without copy/pasting each one
individually ? (The column is to the right of the one that has the text and
comments).

Thanks

Alejandro


--

Dave Peterson
Reply
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
Arithmetical Mode of Criteria in Multiple Non-Adjacent columns Sam via OfficeKB.com Excel Worksheet Functions 4 July 14th 05 09:15 PM
Count Position of Filtered TEXT cells in a column Sam via OfficeKB.com Excel Worksheet Functions 8 May 18th 05 04:23 AM
How to group similar column titles together???? vrk1 Excel Discussion (Misc queries) 2 April 30th 05 12:17 AM
Return Count for LAST NonBlank Cell in each Row Sam via OfficeKB.com Excel Worksheet Functions 12 April 17th 05 10:36 PM
How do I export comments into another excel column as cell content Hernan Excel Worksheet Functions 1 February 25th 05 02:17 PM


All times are GMT +1. The time now is 05:48 PM.

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

About Us

"It's about Microsoft Excel"