Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 17
Default cell content into a note

hey guys,

just curious if this can be achieved or how it can be achieved

say i have this

Column A Row 1 = Short Description
Column B Row 1 = Long descriptoin

B2:B10 = are all the short descriptions
B2:B10 = are all the long descriptions

is there a way to just put the comment into the short description
cells from the long description cells via a note and then hide the
long description column?

can anyone advise as to how this can be achieved?
cheers

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default cell content into a note

Hi Chuck

This small macro should do the trick

Sub CopyDescToComment()
Dim lr As Long, i As Long
lr = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To lr

Cells(i, 1).AddComment
Cells(i, 1).Comment.Text Text:="" & Cells(i, 2).Value

Next
Columns("B:B").EntireColumn.Hidden = True
End Sub

Copy the macroAlt+F11Insert ModulePaste code into white paneAlt+F11 to
return to Excel sheet.

ToolsMacroRunhighlight macro nameRun

--
Regards
Roger Govier



"Chuck" wrote in message
oups.com...
hey guys,

just curious if this can be achieved or how it can be achieved

say i have this

Column A Row 1 = Short Description
Column B Row 1 = Long descriptoin

B2:B10 = are all the short descriptions
B2:B10 = are all the long descriptions

is there a way to just put the comment into the short description
cells from the long description cells via a note and then hide the
long description column?

can anyone advise as to how this can be achieved?
cheers



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default cell content into a note

Roger

Your macro will crash if column A already has Comments, giving user no way to
edit column B long descriptions and re-Comment without deleting orignal Comment
in A

I amended to this..........

Sub CopyDescToComment()
Dim lr As Long, i As Long
lr = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To lr
If Cells(i, 1).Comment Is Nothing Then
Cells(i, 1).AddComment
Cells(i, 1).Comment.Text Text:="" & Cells(i, 2).Value
Else
Cells(i, 1).Comment.Text Text:="" & Cells(i, 2).Value
End If
Next
Columns("B:B").EntireColumn.Hidden = True
End Sub


Gord Dibben MS Excel MVP

On Thu, 1 Nov 2007 23:42:04 -0000, "Roger Govier"
<rogerattechnology4NOSPAMu.co.uk wrote:

Hi Chuck

This small macro should do the trick

Sub CopyDescToComment()
Dim lr As Long, i As Long
lr = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To lr

Cells(i, 1).AddComment
Cells(i, 1).Comment.Text Text:="" & Cells(i, 2).Value

Next
Columns("B:B").EntireColumn.Hidden = True
End Sub

Copy the macroAlt+F11Insert ModulePaste code into white paneAlt+F11 to
return to Excel sheet.

ToolsMacroRunhighlight macro nameRun


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default cell content into a note

Hi Gord

You are quite right. Thanks for picking that up.
I only tested with a first run through, didn't try again after comments had
been added to cells.
Hard slap on wrist duly administered<bg

--
Regards
Roger Govier



"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Roger

Your macro will crash if column A already has Comments, giving user no way
to
edit column B long descriptions and re-Comment without deleting orignal
Comment
in A

I amended to this..........

Sub CopyDescToComment()
Dim lr As Long, i As Long
lr = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To lr
If Cells(i, 1).Comment Is Nothing Then
Cells(i, 1).AddComment
Cells(i, 1).Comment.Text Text:="" & Cells(i, 2).Value
Else
Cells(i, 1).Comment.Text Text:="" & Cells(i, 2).Value
End If
Next
Columns("B:B").EntireColumn.Hidden = True
End Sub


Gord Dibben MS Excel MVP

On Thu, 1 Nov 2007 23:42:04 -0000, "Roger Govier"
<rogerattechnology4NOSPAMu.co.uk wrote:

Hi Chuck

This small macro should do the trick

Sub CopyDescToComment()
Dim lr As Long, i As Long
lr = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To lr

Cells(i, 1).AddComment
Cells(i, 1).Comment.Text Text:="" & Cells(i, 2).Value

Next
Columns("B:B").EntireColumn.Hidden = True
End Sub

Copy the macroAlt+F11Insert ModulePaste code into white paneAlt+F11 to
return to Excel sheet.

ToolsMacroRunhighlight macro nameRun




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
Validation note to comment note Oldjay Excel Discussion (Misc queries) 1 August 23rd 07 04:27 PM
Excel Attach a note to a cell AGAl Excel Discussion (Misc queries) 2 April 8th 07 01:20 AM
Note in Cell EArmistead New Users to Excel 2 November 21st 06 08:23 PM
Importing gif as a note on a cell bluebadger Excel Discussion (Misc queries) 1 June 23rd 06 12:20 PM
How do i enter a note in excel to an unlocked cell on a protected. Kev Excel Discussion (Misc queries) 1 January 17th 05 11:17 PM


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