Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Need help for 2 modifications to the sub below
Within the selected range: 1. Empty cells or cells with formulas evaluating to "" (zero length null strings) should not have any comments inserted. 2. For cells with existing comments prior to the sub's run, the cell results are to be written as a new line below the text within the existing comments. As-is the sub overwrites such cells with new comments. Sub FormulaResultToComment() 'Joel .prog 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 Cell.Comment.Text Text:=Cell.Value End If Next Cell End Sub Thanks Max |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Empty Cell writes over full cell | Excel Discussion (Misc queries) | |||
formula that writes to a *different* cell? | Excel Worksheet Functions | |||
2 VBA enhancements | Excel Programming | |||
Excel In-cell Enhancements | Excel Worksheet Functions | |||
Need Code Enhancements | Excel Programming |