Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-13-2014, 05:20 AM
ElisCom ElisCom is offline Excel: Copy and Paste into a Comment ? Windows 7 32bit Excel: Copy and Paste into a Comment ? Office 2010 32bit
Novice
Excel: Copy and Paste into a Comment ?
 
Join Date: Feb 2014
Posts: 2
ElisCom is on a distinguished road
Default Excel: Copy and Paste into a Comment ?

Hi everyone,



I searched the Forum but I didn't find anything about it.

How is it possible to copy data and paste them into a comment in a specific cell?

Once in a week I have to fill 10x7=70 comments in cells of an Excel file with a lot of data that I get from an other excel file.

This work takes a lot of time entering manually all data!! I was wondering if it is possible to simplify this work.

Thank you in advance for your help.

Andrea
Reply With Quote
  #2  
Old 02-16-2014, 07:42 PM
macropod's Avatar
macropod macropod is offline Excel: Copy and Paste into a Comment ? Windows 7 32bit Excel: Copy and Paste into a Comment ? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Yes, it is possible to use a macro to add content to comments. For example, the following macro adds the formulae to the comments for each selected cell, or even the whole worksheet, and displays the comments in an appropriately-sized box.
Code:
Sub AddFormulasToComments()
Application.ScreenUpdating = False
Dim CommentRange As Range, TargetCell As Range
'skip over errors caused by trying to delete comments in cells with no comments
On Error Resume Next
'If the whole worksheet is selected, limit action to the used range.
If Selection.Address = Cells.Address Then
  Set CommentRange = Range(ActiveSheet.UsedRange.Address)
Else
  Set CommentRange = Range(Selection.Address)
End If
'If the cell contains a formula, turn it into a comment.
For Each TargetCell In CommentRange
  With TargetCell
    'check whether the cell has a formula
    If Left(.Formula, 1) = "=" Then
      'delete any existing comment
      .Comment.Delete
      'add a new comment
      .AddComment
      'copy the formula into the comment box
      .Comment.Text Text:=.Formula
      'display the comment
      .Comment.Visible = True
    End If
  End With
Next
MsgBox "  To print the comments, choose" & vbCrLf & " File|Page Setup|Sheet|Comments," & vbCrLf & "then choose the required print option.", vbOKOnly
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 02-17-2014, 03:50 AM
ElisCom ElisCom is offline Excel: Copy and Paste into a Comment ? Windows 7 32bit Excel: Copy and Paste into a Comment ? Office 2010 32bit
Novice
Excel: Copy and Paste into a Comment ?
 
Join Date: Feb 2014
Posts: 2
ElisCom is on a distinguished road
Default

Thank you,

I will try to use it today!

Cheers

Andrea
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel: Copy and Paste into a Comment ? Copy/paste from Excel to Word problems! mross127 Word 10 08-16-2017 04:41 PM
Excel: Copy and Paste into a Comment ? Copy/Paste EXCEL cells as pic in WORD A_Lau Drawing and Graphics 3 12-19-2014 06:57 AM
How to Copy data from Outlook mail and Paste it in a Excel sheet? padhu1989 Outlook 0 09-11-2012 04:07 AM
Excel: Copy and Paste into a Comment ? Word 2007 Copy/Paste Excel issue raven26c Word 1 11-18-2011 02:49 AM
copy/paste charts from excel to word bielak01 Excel 0 04-16-2009 02:27 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:55 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft