Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default Variable Text in Comments box.

Hi

Is it possible to have for example the contents of cell A1 & A2 in the
comments box?

Therefore changing the comment as the cells change.

I have tried looking on Contextures site.

Thanks very much

Steve


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Variable Text in Comments box.

Hi,

You don't give too much details but this enters a comment in C1 comprising
the Text in A1 & A2. Right click your sheet tab, view code and paste this in

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("A1:A2")) Is Nothing Then
Application.EnableEvents = False
With Range("C1")
.ClearComments
.AddComment
.Comment.Text Range("A1").Value & Range("A2").Value
End With
Application.EnableEvents = True
End If
End Sub

Mike

"Steve Jones" wrote:

Hi

Is it possible to have for example the contents of cell A1 & A2 in the
comments box?

Therefore changing the comment as the cells change.

I have tried looking on Contextures site.

Thanks very much

Steve



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default Variable Text in Comments box.

Thanks Mike - excellent.


"Mike H" wrote in message
...
Hi,

You don't give too much details but this enters a comment in C1 comprising
the Text in A1 & A2. Right click your sheet tab, view code and paste this
in

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("A1:A2")) Is Nothing Then
Application.EnableEvents = False
With Range("C1")
.ClearComments
.AddComment
.Comment.Text Range("A1").Value & Range("A2").Value
End With
Application.EnableEvents = True
End If
End Sub

Mike

"Steve Jones" wrote:

Hi

Is it possible to have for example the contents of cell A1 & A2 in the
comments box?

Therefore changing the comment as the cells change.

I have tried looking on Contextures site.

Thanks very much

Steve





  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default Variable Text in Comments box.

Hi Mike

I used the code in a blank spreadsheet and it does exactly what I wanted.

In my spreadsheet however the results in cells A1 and a2 are text and
results from a lookup table.

Because I'm not entering anything in cells A1 and A2 the code doesn't run.

Any ideas?

Thanks once again

Steve





"Mike H" wrote in message
...
Hi,

You don't give too much details but this enters a comment in C1 comprising
the Text in A1 & A2. Right click your sheet tab, view code and paste this
in

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("A1:A2")) Is Nothing Then
Application.EnableEvents = False
With Range("C1")
.ClearComments
.AddComment
.Comment.Text Range("A1").Value & Range("A2").Value
End With
Application.EnableEvents = True
End If
End Sub

Mike

"Steve Jones" wrote:

Hi

Is it possible to have for example the contents of cell A1 & A2 in the
comments box?

Therefore changing the comment as the cells change.

I have tried looking on Contextures site.

Thanks very much

Steve





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
Entering Variable Text in Text Boxes...... Steve Jones Excel Discussion (Misc queries) 3 June 14th 07 02:34 PM
Text Box Comments TashaTart Excel Discussion (Misc queries) 0 May 3rd 06 04:17 PM
how do I wrap up the text to all comments in one spreadsheet? CQ Excel Discussion (Misc queries) 0 December 6th 05 09:16 PM
Lookup Text in Comments malik641 Excel Worksheet Functions 2 July 5th 05 12:36 PM
Putting text in a column based on variable text from another colum Jacky D. Excel Discussion (Misc queries) 1 December 16th 04 06:09 PM


All times are GMT +1. The time now is 06:22 AM.

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"