Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Can Comment in a cell be changed as the content in another cell ??

Hi, I have a file with hundereds of card number with their corresponiding
cell with relative info. These corresponding cells have comments, I want to
put the comments in separate cell so that I can look at these in one go,
otherewise I have to put the pointer on individual cell to read the comment.
Can anyone halp me out.
Thanks,
Amit.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Can Comment in a cell be changed as the content in another cell ??

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

Amit Kumar Baidyaka wrote:

Hi, I have a file with hundereds of card number with their corresponiding
cell with relative info. These corresponding cells have comments, I want to
put the comments in separate cell so that I can look at these in one go,
otherewise I have to put the pointer on individual cell to read the comment.
Can anyone halp me out.
Thanks,
Amit.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Can Comment in a cell be changed as the content in another cel

Hi Peter, Could u please simplify what u have written, as I could not
implement the same.Thanks, Amit.

"Dave Peterson" wrote:

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

Amit Kumar Baidyaka wrote:

Hi, I have a file with hundereds of card number with their corresponiding
cell with relative info. These corresponding cells have comments, I want to
put the comments in separate cell so that I can look at these in one go,
otherewise I have to put the pointer on individual cell to read the comment.
Can anyone halp me out.
Thanks,
Amit.


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Can Comment in a cell be changed as the content in another cel

After you read David McRitchie's notes, what were your specific questions.

I'm not sure I know where to start.

Short course:

Open your workbook.
Hit alt-f11 to get to the VBE (where macros/UDF's live)
hit ctrl-r to view the project explorer
Find your workbook.
should look like: VBAProject (yourfilename.xls)

right click on the project name
Insert, then Module
You should see the code window pop up on the right hand side

Paste the code in there.

Now go back to excel.
Into a test cell and type:
=getcomment(a1)


Amit Kumar Baidyaka wrote:

Hi Peter, Could u please simplify what u have written, as I could not
implement the same.Thanks, Amit.

"Dave Peterson" wrote:

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

Amit Kumar Baidyaka wrote:

Hi, I have a file with hundereds of card number with their corresponiding
cell with relative info. These corresponding cells have comments, I want to
put the comments in separate cell so that I can look at these in one go,
otherewise I have to put the pointer on individual cell to read the comment.
Can anyone halp me out.
Thanks,
Amit.


--

Dave Peterson


--

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
Can a formula find a comment in a cell CRH Excel Worksheet Functions 3 September 28th 06 07:47 AM
Shortcut key for displaying the active cell comment Tonso Excel Discussion (Misc queries) 3 July 22nd 06 09:11 PM
comments at end of sheet are not printing correctly TreebeardEnt Excel Discussion (Misc queries) 0 June 7th 06 12:20 AM
Help with this conditional IF statement C-Dawg Excel Discussion (Misc queries) 3 May 15th 06 06:01 PM
lookup cell content in multiple files oldbuffer Excel Worksheet Functions 0 September 13th 05 06:37 PM


All times are GMT +1. The time now is 07: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"