Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi ,
I have cells that contain prices. I have a function to calculate the sum of 5 cells. Is it possible to add this value in the comment field (little red triangle in the corner of the fifth cell)?. Can I do it with VBA? Thanks Jack |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I assume you're expecting the comment field to be dynamic/volatile?
Pretty sure that's not possible; value in a comment field is just static text. You could write a VBA routine that can add up cells and put the value into a new or existing comment. This routine would need to be run every time you changed or added new data (if you wanted the values to be up-to-date). Could attach it to an Event so that it always runs when the worksheet is selected. On Jul 23, 12:40 pm, Barb wrote: Hi , I have cells that contain prices. I have a function to calculate the sum of 5 cells. Is it possible to add this value in the comment field (little red triangle in the corner of the fifth cell)?. Can I do it with VBA? Thanks Jack |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Keeena,
Yes I just want to add the value that was calculated in VBA. That's not Dynamic. how can I add the value of the variable that was calculated in VBA in that comment field? Thanks. "keeena" wrote: I assume you're expecting the comment field to be dynamic/volatile? Pretty sure that's not possible; value in a comment field is just static text. You could write a VBA routine that can add up cells and put the value into a new or existing comment. This routine would need to be run every time you changed or added new data (if you wanted the values to be up-to-date). Could attach it to an Event so that it always runs when the worksheet is selected. On Jul 23, 12:40 pm, Barb wrote: Hi , I have cells that contain prices. I have a function to calculate the sum of 5 cells. Is it possible to add this value in the comment field (little red triangle in the corner of the fifth cell)?. Can I do it with VBA? Thanks Jack |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Barb/Jack-
it isn't clear to me if you are asking for more comprehensive help (how do I add up the numbers in VBA in the first place) but with regards to just adding it in a static comment, it is something like (air code): Sheet1.Range("E4").Comment.Text Text:="The sum is " & cStr(MyTotal) Where MyTotal is the variable where you've added up your values. If you need to do this for multiple rows, you'll need to use a loop to cycle through the appropriate rows (will it be the same rows each time, or do you need to be able to specify which rows?), add them up (which cells need to be added?) and decide if there are any conditions in which a total was calculated in a previous run of the macro and needs to be removed. If you need more help, just post again and let us know how far you got. Keith "Barb" wrote in message ... Hi Keeena, Yes I just want to add the value that was calculated in VBA. That's not Dynamic. how can I add the value of the variable that was calculated in VBA in that comment field? Thanks. "keeena" wrote: I assume you're expecting the comment field to be dynamic/volatile? Pretty sure that's not possible; value in a comment field is just static text. You could write a VBA routine that can add up cells and put the value into a new or existing comment. This routine would need to be run every time you changed or added new data (if you wanted the values to be up-to-date). Could attach it to an Event so that it always runs when the worksheet is selected. On Jul 23, 12:40 pm, Barb wrote: Hi , I have cells that contain prices. I have a function to calculate the sum of 5 cells. Is it possible to add this value in the comment field (little red triangle in the corner of the fifth cell)?. Can I do it with VBA? Thanks Jack |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
comment (with little red triangle) appearing in pivot table | Excel Discussion (Misc queries) | |||
how to change the color of the triangle indicating a comment | Excel Discussion (Misc queries) | |||
Changing the color of the "comment" triangle | Excel Discussion (Misc queries) | |||
"red" Triangle in Comment Indicator- make bigger?? | New Users to Excel | |||
the red triangle that indicates comment has dissipeared while the. | Excel Discussion (Misc queries) |