# Changing comment in cells based on changes in other cells

#### RSprengers

##### Board Regular
I have some cells with text (user can change this)
And I have a row with numbers (calculations)

Two related problems:

1. I want to add a comment to each calculation cell that contains data from the text cells (all calculations have different comments, so I have to input this manually) BUT...

2. I want the comments to change if the user changes the text cells

example:

text cell (A1) has text 'abcd' / (a2) has text 'defg'
calculation cell (B1) has comment 'abcd + defg'

Once the user changes a2 to 'hijk', the comment in B1 should change to 'abcd + hijk'

Any solutions?

### Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Hello,

Put this code into the relevant sheet code window

Code:
``````Private Sub Worksheet_Change(ByVal Target As Range)
Range("B2").Comment.Text Text:=Range("A1").Value & " + " & Range("A2").Value
End If
End Sub``````

Hi, thx for the quick reply, only one thing...

The text cells (12 in total) can all change independently
Once any off the cells change, ALL calculation cell comments that are affected (use the text of the changed cell) have to change.

Using the solution you gave it looks like I have to write a different sub for every calculation cell...

Which 12 cells change and which cells do they reference?

If they are together the program can be changed to suit.

I have text in cells a1 to a12

and calculations in

b1-b10
c1-c10
d1-d10
e1-e10
f1-f10

Hello,

So if you change A5, which cells with comments is changes?

It changes all cells that use A5.

Let me try to be more clear...

A1-A12 are month codes (for example March06, Jun06, Sep06 etc.)

The calculations are all combinations I use for every month (Say March06 - Jun06 or March06 - Sep06) (There are also calculations using 3 or even 4 months)

If I just have the numbers it is pretty hard to see how this number was calculated so I want the cell with the calculation to show me how I calculated this number.

Every month, I get new month codes as the first month doesn't exist anymore (So it is replaced with the next)

So there will be a number of cells changing if one of the month codes changes. (In fact they all change at the same time, so all comments should change as well)

It is not possible to just link the cell to show the data in the cells that show me the text because of 2 reasons:
1.- I obviously can only show a result of a calculation OR the text in the cell.
2.- The explanation (which I want to show in a comment) is too big so it completly messes up my layout)

Hope you can help me

Hello,

Can you not put the cell refs into the comment, as I assume these don't change?

YES, if I only knew how to do that

That's what I'm trying to do

Hello,

You misunderstood my last post.

Instead of putting =abcd + defg in the comment, can you not put =A1 + A2

Replies
2
Views
282
Replies
2
Views
334
Replies
6
Views
196
Replies
14
Views
390
Replies
13
Views
606

1,196,388
Messages
6,014,995
Members
441,864
Latest member
sweezy40

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back