Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 148
Default Inserting Comments en mass

I am working with Excel 2003

I have a spreadsheet with a list of Employee Names in column A, and a list
of Employee Numbers in column B.

I would like to be able to move all of the Employee Numbers into comments
for the coresponding Employee name. Is there a way to cut/paste/insert and do
this? I tried copying and then pasting special using the Comments option, but
it didn't do what I want...

This seems like it would be a very basic and usable function, does it exist?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 396
Default Inserting Comments en mass

Hi Heather

Here's a bit of code to do it:

Sub NumberToComments()

Dim r As Range

Application.ScreenUpdating = False

For Each r In Columns(1).SpecialCells(xlCellTypeConstants, xlTextValues)
r.AddComment
r.Comment.Text Text:=CStr(r.Offset(, 1).Text)
Next

Application.ScreenUpdating = True

End Sub


--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"Heather" wrote:

I am working with Excel 2003

I have a spreadsheet with a list of Employee Names in column A, and a list
of Employee Numbers in column B.

I would like to be able to move all of the Employee Numbers into comments
for the coresponding Employee name. Is there a way to cut/paste/insert and do
this? I tried copying and then pasting special using the Comments option, but
it didn't do what I want...

This seems like it would be a very basic and usable function, does it exist?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 148
Default Inserting Comments en mass

I'm sorry! I'm confused. Is that HTML, or something I should copy/paste into
the cell like regular excel codes?

"Wigi" wrote:

Hi Heather

Here's a bit of code to do it:

Sub NumberToComments()

Dim r As Range

Application.ScreenUpdating = False

For Each r In Columns(1).SpecialCells(xlCellTypeConstants, xlTextValues)
r.AddComment
r.Comment.Text Text:=CStr(r.Offset(, 1).Text)
Next

Application.ScreenUpdating = True

End Sub


--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"Heather" wrote:

I am working with Excel 2003

I have a spreadsheet with a list of Employee Names in column A, and a list
of Employee Numbers in column B.

I would like to be able to move all of the Employee Numbers into comments
for the coresponding Employee name. Is there a way to cut/paste/insert and do
this? I tried copying and then pasting special using the Comments option, but
it didn't do what I want...

This seems like it would be a very basic and usable function, does it exist?

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
Inserting Mass amount of pics corosponding with cells in excel mikewebster20 Excel Discussion (Misc queries) 4 November 2nd 07 06:42 AM
author default for inserting comments jules Excel Discussion (Misc queries) 1 May 19th 07 04:15 AM
inserting comments ? sunrosejenn Excel Discussion (Misc queries) 5 March 7th 06 02:44 PM
2 files, mass update comments between files Katycatchesnut Excel Worksheet Functions 0 June 2nd 05 10:16 PM
Inserting comments on graphs Christopher Anderson Excel Discussion (Misc queries) 3 December 20th 04 09:18 PM


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