Changing comment in cells based on changes in other cells

RSprengers

Board Regular
Joined
Nov 9, 2005
Messages
54
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

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hello,

Put this code into the relevant sheet code window

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$A$2" Then
        Range("B2").Comment.Text Text:=Range("A1").Value & " + " & Range("A2").Value
    End If
End Sub
 
Upvote 0
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...
 
Upvote 0
Which 12 cells change and which cells do they reference?

If they are together the program can be changed to suit.
 
Upvote 0
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
 
Upvote 0
Hello,

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

You misunderstood my last post.

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

Forum statistics

Threads
1,213,511
Messages
6,114,054
Members
448,543
Latest member
MartinLarkin

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top