LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to Add Comments with vlookup


I have an array of data on one sheet, and another sheet with definitions
for each unique record in the array.

I'd like to have Excel automatically look up the definition for each
record and place it in a comment on that cell. This way, the end user
just hovers over each cell and gets the definition for the value in the
cell.

I assume this must be done with a macro, but I have no experience with
macros. Here's my first stab at it (which doesn't work). Could someone
point me in the right direction?

Sub AutoComment()

Dim CommentValue


Set CommentValue = VLOOKUP(ActiveCell,SkillLegend!A:B,2,FALSE)


With B4: H27
If .Comment Is Nothing Then .AddComment
..Comment.Text Text:=CommentValue
End With
End Sub

Thank you!


--
AllenWatts
------------------------------------------------------------------------
AllenWatts's Profile: http://www.excelforum.com/member.php...o&userid=34301
View this thread: http://www.excelforum.com/showthread...hreadid=540704

 
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
Pulling out comments with macro dwake Excel Discussion (Misc queries) 5 November 25th 09 05:41 PM
vlookup comments Ann Excel Discussion (Misc queries) 0 March 8th 07 11:36 PM
cell comments in a vlookup table crusty53 New Users to Excel 0 August 24th 06 05:22 AM
Macro to get comments out of a spreadsheet shanelaura Excel Programming 6 April 27th 06 01:18 PM
Macro to copy into Comments pop-up Jelly's Excel Programming 1 November 29th 05 12:07 AM


All times are GMT +1. The time now is 09:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"