Add Cell Comment Through Macro Or Function

Mar 19, 2007

I need a quick function or a Macro which can add cell comment based on selected cell.
let me explain in detail
Column

a1 Mr A wrote
a2 Mr B Checked
a3 Mr C authorised

etc etc.
now i want the same in Cell B as its cell comments
so after b1 comment will be Mr. A wrote & so on

View 4 Replies


ADVERTISEMENT

Macro To Read Cell Comment

Apr 5, 2013

I want to design a macro to check if the cell has a comment in it. If so, the macro should read the comment and store it in a variable.

View 2 Replies View Related

Insert Comment Function???

Feb 11, 2009

I'm wondering if it's possible to use a lookup formula to populate cell comments? In other words, I'd like to put a lookup table into a cell, and if the value is not FALSE, have that Lookup table then pull in certain information into the cell's comments.

View 2 Replies View Related

Custom Function Returns Range And Comment

Jun 20, 2006

I am trying to write a UDF that will calculate a value and return it to the cell, and also create a comment in the cell showing the formula used. Here is an example of the "=calculate(A2,B2)" placed in cell A1

Function calculate(ByRef X As Range,ByRef Y As Range)
calculate=x*y
calculate.addcomment "calculate = " & X & " * " & Y
End Function

the problem commes from the add comment field. I can add a comment to any cell but the cell the formula is called from.

View 3 Replies View Related

Copy Contents Of Multiple Comment Boxes And Paste In Single Comment Box

Mar 13, 2014

how to copy the contents of multiple comment boxes and paste in a single comment box.

The big picture is that I have a number of cells with numerical values in and text in comment boxes. I want to be able to click a button to copy the contents of the comment boxes and paste them, along with the numerical value from the cell, into a single comment box, ordered by highest to lowest value within the comment box, then delete the original cells and comments.

I am quite new to VBA but have been coping quite well so far with information of the web and analysing recorded macros.

View 6 Replies View Related

Run Macro When Comment Is Inserted?

Nov 6, 2012

how can i run a macro after a comment is inserted?

View 6 Replies View Related

Auto Comment Macro ()

Dec 4, 2006

Need a macro for the following:
C | D | F (Column)
10 | 100 | Yes (data)

If column F = Yes then
column G = "abc = 10, def fgh = 100"

where 'abc =' is additional text, '10' is C value.

Loop till the last row of F.

Basically, I want to autofill column G with the data derived from column C & D + some text.

View 3 Replies View Related

Comment Box Size - Macro

Apr 12, 2007

I am using the following macro to creat comments based on the contents of certain cells. Everything works except the it resizes the Comment Boxes exponentially. The Last comment box in the range seems to be the default size, the next to last a little bigger, then it start getting even larger and larger until the first comment in the colomn.

Sub InsertComm()
Dim RgPartnumb As Range
Dim NRg As Range
Set RgPartnumb = Range(Range("B2"), Range("B2").End(xlDown))
On Error Resume Next
For Each NRg In RgPartnumb
With NRg
.Comment.Delete...................................

View 9 Replies View Related

Insert Comment & Format Macro

Jun 3, 2006

I wanted to make a simple macro forinserting a comment, given certain parameters: margins & alignment...but its not working...how would i get this to function properly

ActiveCell.AddComment
ActiveCell.Comment.Visible = False
ActiveCell.Comment.Text Text:=""
With Selection.Font
. Name = "Tahoma"
.FontStyle = "Bold"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False...............................

View 2 Replies View Related

Using A Macro To Comment And Uncomment Code

Jul 28, 2006

I know that there is a way to delete macros in a file using another macro in order to save the file as a macro-free copy. I was wondering though if there is a way to comment and uncomment code using a macro, as well. The reason I need to do this is that I have a module that builds Excel files for me using a template, but that template has to have certain lines of code commented first in order for the module to run correctly. After the module is done building the file, I must uncomment those lines manually and was wondering if there is an automatic way to do this.

View 3 Replies View Related

Macro Crashes: Comment Blocked The Code

Jul 26, 2009

I have comment blocked the code that causes Excel to crash.

View 4 Replies View Related

Sort Data By Comment Contents / VB Macro

Oct 3, 2009

please have a look at the attached file.

I want to sort the data by the comments in Column B, specifically by comments that do contain a telephone number, whether it is "Telefon" ( e.g. in B17 ) or "Phone" ( e.g. in B24 ) or "Téléphone" ( e.g. in B16 )

I know a Macro written in VB could do that.

View 8 Replies View Related

Macro To Add Comment To All Cells Containing Text Within Sheet

Jul 11, 2013

I am in need of a macro that will copy the text from A1, and paste it to a comment on every cell that contains text within sheet 1.

View 4 Replies View Related

Autoupdate Cell Comment Based On Cell Input / Dynamic Cell Comments?

Aug 16, 2013

I'm wondering if it is at all possible to have a cell comment automatically update depending on what data is input in the cell (via user input, VLOOKUP, etc.)?

For example, if cell A1 contains the text "CHARLES" with a comment saying "Employee of the Month", and is then subsequently updated with the new text "JOHN" (again, via direct input, a VLOOKUP, data validation, etc.) is there a way to have the comment automatically update to say something else, such as "Team Lead" for example?

I've considered using VBA to accomplish my goal, but am unsure how to compose an effective code to do so. I've also considered perhaps creating a named table filled with all the different comment possibilities I would like to have used in this cell and then inputting a formula in either cell A1, or the comment contained therein, that would then call the corresponding text from that table based on the data in cell A1. Honestly, I'm not sure that what I'm trying to do is even possible;

View 4 Replies View Related

Copy Comment To Designated Cells On Another Worksheet Using Macro

Nov 2, 2009

I really appreciate help from the excel gurus and expert here on my little problem. I'm rarely using excel and have a very little knowledge on VBA programming.In short, I've been requested to develop a shift schedule for my department that can automate the shift staff schedule on the monthly basis.

I've created two worksheet of which the first worksheet is represent as master data list (INPUT Worksheet) that contain with formulas. While the other worksheet is the automated shift data (REPORT Worksheet) that linked from the master data list (INPUT Worksheet).

Attached herewith is a sample of my work. As you can see,I wanted to copy comments from the input worksheets (on DUTY column) so that it will then automatically appears or updated in the shift schedule. Whenever the dropdown selection change, the data will change accordingly. On the REPORT worksheet, each cells, range D14:AH38 are referring to DUTY column month by month. I'm able to link it but it fails to copy over the comments as well. I believe that macro can resolve this, can someone help me on this?

View 12 Replies View Related

Macro To Make Insert Comment Window Appear Automatically

Sep 11, 2007

I have created an attendance tracker for a team of people at work. It simply involves a grid of the days of the month and on each 'day' (or cell) I have set up the Validation command to prompt the the user to select whether they were at work, on holiday, off sick etc. etc from a drop down box. If they do not change the cell, its defaulted value is that they are in work.

When a user selects the days that they are planning a holiday in the future, they are meant to write a comment on the cells they have changed, to advise when they had 'requested' the holiday.

What I would like is (a macro?) which makes the comment box automatically 'pop up' when they change a cell from its default value prompting them to fill in the details rather than relying on them to 'add comments' manually.

In addition, what would be the best way to 'restrict' them from booking holiday within the next 7 days - we have a problem with people booking holiday on 'lastminute.com' for 2 days time, booking off the holiday on the spreadsheet and saying that they had it planned for weeks!

View 9 Replies View Related

Macro To Comment On Cells Based On Formula's (duplicate, Length, No Entry)

Jun 25, 2009

making a macro that will scan for duplicates, length & empty cells.

I have the sample file below that does conditional formatting but it doesnt help as much because I want to show the reason for the highlight's on a comment instead.

sample file : [url]

file that might help out: [url]

checks would be:
column A - duplicates and/or length should not be over 100 characters
column B - duplicates
column F - should only contain 2 comma's(or 3 keywords)
all columns - check if no entries are found(empty cells)

View 9 Replies View Related

Add Comment To A Cell

Feb 18, 2008

I have some code that finds the appropriate string for a comment from another sheet. I then want to add the string to the appropriate range selection but am encountering an Object Variable or With Block Variable Not set on this section of

Range("C" & i).Select
ActiveCell.Comment.Delete <== Here Or the Next line
ActiveCell.AddComment (Commenta)
ActiveCell.Comment.Shape.TextFrame.AutoSize = True

Where Commenta is the string value I want to add.

View 3 Replies View Related

Excel 2010 :: Add Comment To Cell Without Changing Cell's Contents?

Mar 13, 2012

How, via VBA, would I add a comment from a userform (text box name: txtReason) into a cell that may already have a comment in it? I would like to keep the comment that is in the cell and then have the program add a "/" and the next comment from txtReason..

(using excel 2010)

View 2 Replies View Related

Paste Copied Contents Of A Cell As A Comment In Another Cell

Sep 7, 2012

I am working on a database and trying to remove duplicates. When there are duplicates, I want to take the contents of one cell and copy them as a comment on the cell above (or below).

I tried to work on a small macro to do so, but the contents of the cell cannot be copied (it comes out as a blank).

The long way is to 'double click' in the cell, Ctrl+A, cut, click the cell above, Ctrl+F2, paste. This way is very long as I have thousands of duplicates.

View 4 Replies View Related

How To Reference A Cell In Another Workbook And Return Cell Value And Comment

Nov 2, 2012

What is the best way to reference a cell in another workbook and return the cell contents and the comment on that cell. I would like the comment to come across as a comment in the new workbook becuase the comment is actually a picture.

Hope this makes sense. I did find a macro through googling but I couldn't get it to work? I don't really want to copy and paste because eventually I have hundreds of sheets & thousands of cells to refer to.?

View 2 Replies View Related

Making 1 Cell Equal Another Cell Including Its Comment?

May 18, 2014

I have a spreadsheet with some cells which return values using INDEX and MATCH to bring back the entire details of a person based on there membership number. However I require the comments to be attached with the returned values. The comments have there image in, rather than just text.

I have found some answers with vba, which do the process, however you had to manually enter the cell, from which the comment was to be copied from, into a pop up box. This involved finding the box myself to then select the box to take the comment from. In doing this I had found and read the comment, which is the is the process I'm trying to bypass.

View 8 Replies View Related

To Copy A Cell Content To A Comment Into Another Worksheet In The Same Cell Ref

Jun 25, 2008

I need to copy a cell content to a Comment into another worksheet in
the same cell ref.

sheet1
A1 = apple
A2 = orange

Sheet2 - target
A1 = comment (apple)
A2 = comment (orange)

View 9 Replies View Related

Add Picture To Cell Comment

May 15, 2008

i need to have a way to link a small picture/thumbnail to a cell. so that there is a way to preveiw it. Ideally like what happens with the comments where you hover over the cell and the comment would pop up. or failing that may be a cell linking to the image.

View 8 Replies View Related

Lookup For Cell Comment

Jan 16, 2009

make the contents of the cell comment box dependent on the cell contents? eg if the cell contents = 2 and a seperate table says 2 is "poor" can it automatically populate the comment with "poor" ?

View 5 Replies View Related

Insert A Comment In A Cell

Jun 9, 2009

When I insert a comment in a cell, my corporate version of Excel displays my employee number. How can Code a cell to populate this employee number.

View 3 Replies View Related

Return Value From Cell Comment?

Aug 20, 2014

I'm using a function at the moment to copy the comment text from cells, but would like to Change it a Little. At the Moment I have:

[Code]...

There are 3 Basic Groups that the comments refer to, eg: If a comment is a 1,4,11,14 it's Group A. 2,5,12,15 are Group B, etc...

View 2 Replies View Related

Inserting PDF Into Cell Comment?

Mar 14, 2013

Is there a way to insert a pdf into a cell comment? I found how to insert an object but when I do that it covers the entire spreadsheet. I would like to be able to add pdf's to cell comments.

View 3 Replies View Related

Add A Comment With The Value Of The Corresponding Cell 9 Columns Across

Feb 7, 2008

I've some code to add a comment with the value of the corresponding cell 9 columns across:

For Each rCell In rRng.Offset(0, 0).Resize(rRng.Rows.Count, rRng.Columns.Count)
On Error Resume Next
rCell.AddComment
On Error GoTo 0
rCell.Comment.Text "Previous value was " & Cells(rCell.Offset(0, 9).Value) '(rRng.Row, rRng.Column).Value

View 9 Replies View Related

Cell Comment Autosize

Mar 17, 2009

I have the code below, and it works perfectly on my Mac. But... on my PC it does not.

The cell comment does not resize horizontally when I enter text. So if I enter a long comment I get a comment box that extends far to the right to fit the contents in. Vertically it is fine, nothing cut off and no extra space.

Any ideas why this would be? Any ideas how I can force the text to wrap in the cell comment box?

Code is below:

Sub AddCom()
Const USERNAME As String = "Greer:"
Dim strCommentName As String
Dim cmnt As String
Dim NoMore As Boolean
Dim Pos As Long

cmnt = InputBox("Please enter a comment")
strCommentName = cmnt & vbLf & Now
On Error GoTo 0

With activeCell...........

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved