Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'd select a formula range, eg select B2:C10, and would like to run a sub to
write all formula results into each cell's comment. Thanks. Rgds Max |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub FormulaToComment()
' ' For Each cell In Selection If Len(cell.Formula) 0 Then If cell.Comment Is Nothing Then cell.AddComment End If cell.Comment.Text Text:=cell.Formula End If Next cell End Sub "Max" wrote: I'd select a formula range, eg select B2:C10, and would like to run a sub to write all formula results into each cell's comment. Thanks. Rgds Max |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, Joel. Tried your sub, but it doesn't write the required formula
*results* into the comments. It writes the formulas. Could your sub be amended to yield the necessary? Rgds Max |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Change this line:
cell.Comment.Text Text:=cell.Formula To: cell.Comment.Text Text:=cell.Value "Max" wrote: Thanks, Joel. Tried your sub, but it doesn't write the required formula *results* into the comments. It writes the formulas. Could your sub be amended to yield the necessary? Rgds Max |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, JLGWhiz !
That change did it. Rgds Max |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
select data and write results to new worksheet in same workbook | Excel Discussion (Misc queries) | |||
Charting Results with Comments | Charts and Charting in Excel | |||
Sub to write another result dimension into comments over formula c | Excel Programming | |||
Wanting to write results to array instead of sheet, results overwriting.... | Excel Programming | |||
Macro to write to webpage & query results | Excel Programming |