Not with an inbuilt function, but you can add a user-defined-function to your workbook to do that.
Function COUNTP(Ref As Range) As Long
'Counts the number of items in a cell's formula
'as determined by + and - operators
COUNTP = Len(Ref.Cells(1, 1).Formula) - _
Len(Replace(Replace(Ref.Cells(1, 1).Formula, "+", ""), "-", "")) + 1
End Function
How to install the User Defined Function:
1. Open up your workbook
2. Get into VB Editor (Press Alt+F11)
3. Insert a new module (Insert > Module)
4. Copy and Paste in your code (given above)
5. Get out of VBA (Press Alt+Q)
6. Save as a macro-enabled workbook
The function is installed and ready to use.
If your formula were in cell A1, then in another cell enter this to get the count of items in that formula:
=COUNTP(A1)
Bookmarks