Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Linking a comment to a range

Hi,

I want to try and do a smart thing with cell comments.

The user is asked to create a custom group from a predefined list (for
example say they are a list of names).
The user types in the name of their group (e.g. "Boys") then, using tick
boxes, selects all the boys they want in that group.

What I would like to see is the name of the group appearing on the next
sheet and the cell comment to list those names that were selected.

I can manage the selected data okay, just cannot get that into a comment.

Any help would be great

Cheers

Kevin


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Linking a comment to a range

Use the addcoment method of the range object, i.e.

Worksheets(1).Range("E5").AddComment "Current Sales"


Bob L.


"Kevin Smith" wrote in message
...
Hi,

I want to try and do a smart thing with cell comments.

The user is asked to create a custom group from a predefined list (for
example say they are a list of names).
The user types in the name of their group (e.g. "Boys") then, using tick
boxes, selects all the boys they want in that group.

What I would like to see is the name of the group appearing on the next
sheet and the cell comment to list those names that were selected.

I can manage the selected data okay, just cannot get that into a comment.

Any help would be great

Cheers

Kevin




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Linking a comment to a range

Thanks Bob.

This will add a comment in E5 with the text "Current Sales" in the comment.

I already have the comment in E5 and I would like it to reflect what is in
cell A1 or A1:A5 etc.

Thanks

"Bob" wrote:

Use the addcoment method of the range object, i.e.

Worksheets(1).Range("E5").AddComment "Current Sales"


Bob L.


"Kevin Smith" wrote in message
...
Hi,

I want to try and do a smart thing with cell comments.

The user is asked to create a custom group from a predefined list (for
example say they are a list of names).
The user types in the name of their group (e.g. "Boys") then, using tick
boxes, selects all the boys they want in that group.

What I would like to see is the name of the group appearing on the next
sheet and the cell comment to list those names that were selected.

I can manage the selected data okay, just cannot get that into a comment.

Any help would be great

Cheers

Kevin





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Linking a comment to a range

Assume your group data is on sheet1 with the groups listed in column A and
the list of members in column B such as

group1 member1
member2
member3
group2 member4
member5
member6
member7
group3 member8

Looking for the group listed in E5


With Worksheets("Sheet1")
for each cell in .Range("A1:A500")
if cell.Value = Worksheets("Sheet2").Range("E5").Value then
i = cell.row + 1
do
sStr = .Cells(i-1,2).Value & ", "
i = i + 1
loop while isempty(.cells(i,1) or i = 501
exit for
end if
Next
End With
sStr = application.Trim(sStr)
sStr = Left(sStr,len(sStr) - 1)
worksheets("Sheet2").Range("E5").NoteText Text:=sStr

--
Regards,
Tom Ogilvy

"Kevin Smith" wrote in message
...
Thanks Bob.

This will add a comment in E5 with the text "Current Sales" in the

comment.

I already have the comment in E5 and I would like it to reflect what is in
cell A1 or A1:A5 etc.

Thanks

"Bob" wrote:

Use the addcoment method of the range object, i.e.

Worksheets(1).Range("E5").AddComment "Current Sales"


Bob L.


"Kevin Smith" wrote in message
...
Hi,

I want to try and do a smart thing with cell comments.

The user is asked to create a custom group from a predefined list (for
example say they are a list of names).
The user types in the name of their group (e.g. "Boys") then, using

tick
boxes, selects all the boys they want in that group.

What I would like to see is the name of the group appearing on the

next
sheet and the cell comment to list those names that were selected.

I can manage the selected data okay, just cannot get that into a

comment.

Any help would be great

Cheers

Kevin







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
lookup cell reference and copy contents and comment from a range GarySW Excel Worksheet Functions 0 May 28th 09 06:14 PM
Create comment from cell range MikeG Excel Discussion (Misc queries) 2 September 26th 06 07:19 PM
Linking Comment to Cell Shaun Excel Discussion (Misc queries) 4 June 27th 06 07:15 PM
linking to a cell within a text cell or comment BlueJ2005 Excel Worksheet Functions 0 May 11th 06 10:36 PM
Retrieving comment using range name topola Excel Discussion (Misc queries) 2 October 20th 05 11:27 AM


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