Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Using values of cells in a comment

Sub ABC()
For Each Cell In Range("E1:E5")
If Cell.Value = 1 Then
With Cell.Offset(0, -4)
s = .Range("A1").Value & _
Chr(10) & Range("B1").Value _
& ", " & Range("C1").Value _
& Chr(10) & Range("D1").Value
End With
Cell.NoteText s
End If
Next
End Sub

worked for me.

--
Regards,
Tom Ogilvy


"Bamaopoly" wrote:

MS Excel 2003
I'm writing a macro that will insert a comment in a cell based upon the cell
value. For instance,
A B C D E
1 Address City State Phone 1

What I want to happen is that if E1 = 1 then
Insert a comment in cell E1 as follows:
A1
B1, C1
D1

to read
Street
City, State
Phone

I've got the AddComment working, but how do I pull the values of A1-D1 to
use as text in the comment?

Any help would be appreciated, thanks in advance.

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
comment in cells they have a little red tringel forte Excel Discussion (Misc queries) 4 September 26th 09 06:36 PM
2007 Excel Paste Special Values Deletes Comment WolfgangPD Excel Discussion (Misc queries) 0 May 14th 08 09:02 PM
link cells to a comment Tonso Excel Discussion (Misc queries) 4 June 24th 06 04:01 PM
how can i automatically insert cell values into a comment field? spot987654321 Excel Discussion (Misc queries) 1 June 3rd 05 11:10 PM


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