Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
spot987654321
 
Posts: n/a
Default how can i automatically insert cell values into a comment field?

am trying to insert specific (other) cell values into another cell comment
field.
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Pretty general question.

If it's only one cell, copy the value and insert/edit the other cell's comment
and paste.

If it's lots of cells, you could use a macro.

But since you didn't give any real details, here's a pretty generic userdefined
function that might help you:

Option Explicit
Function CopyValToComment(FCell As Range, TCell As Range)

Application.Volatile

If TCell.Comment Is Nothing Then
'do nothing
Else
TCell.Comment.Delete
End If

TCell.AddComment Text:=FCell.Text

CopyValToComment = "UsedToCopyToComment" 'or "" to show as empty.

End Function

Then I could put this in any cell:
=CopyValToComment(A1,B1)
or even:
=CopyValToComment([book1.xls]sheet2!a3,[book2.xls]sheet1!a5)

After you've populated the comments you want, you can either delete the formulas
(if the comments shouldn't change) or keep the formulas (if the comments should
change when the sending cell changes value).



spot987654321 wrote:

am trying to insert specific (other) cell values into another cell comment
field.


--

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
Insert date automatically Rick Excel Discussion (Misc queries) 2 March 31st 05 11:49 PM
Continuall Add ing values in a cell CAD Concepts Excel Discussion (Misc queries) 4 March 27th 05 11:36 AM
set hypothetical values for a cell chris8715 Excel Worksheet Functions 1 February 22nd 05 05:18 PM
Can an excel cell automatically change fill colors based on values John Clark Excel Discussion (Misc queries) 1 February 5th 05 05:21 PM
Challenging Charting C TO Charts and Charting in Excel 0 January 17th 05 06:57 PM


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