Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'd like to insert a cell's formula into a comment. My
only issue is testing to see if it's an array formula or normal formula. As of now, the macro always says it's an array formula. Thanks for any help you can provide. Sub FormulaInComment() Dim ConfirmBox As String Dim FormulaType As String ConfirmBox = MsgBox("Proceed?", vbYesNo) If ConfirmBox = vbNo Then Exit Sub With ActiveCell If .HasFormula Then If IsNull(.FormulaArray) Then FormulaType = "Formula:" Else FormulaType = "Array Formula:" End If Else MsgBox "No formula in cell!" Exit Sub End If .AddComment .Comment.Text Text:=FormulaType & Chr(10) & .Formula .Comment.Visible = False .Copy .PasteSpecial (xlPasteValues) End With Application.CutCopyMode = False End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Array formula SUMIF with 2D sum_range array | Excel Worksheet Functions | |||
Array formula: how to join 2 ranges together to form one array? | Excel Worksheet Functions | |||
Find specific value in array of array formula | Excel Worksheet Functions | |||
Array Formula - using LEFT("text",4) in formula | Excel Worksheet Functions | |||
A formula needed - probably an array formula | Excel Programming |