Need Help in counting + sign in a cell
This small UDF will return the number of plus signs in a formula:
Function count_plus(r As Range) As Integer
v = r.Formula
count_plus = Len(v) - Len(Replace(v, "+", ""))
End Function
This small UDF will display a function as a string:
Function formularity(r As Range) As String
formularity = r.Formula
End Function
--
Gary''s Student - gsnu2007
" wrote:
I am entering the following in a cell: =5+8+60+1
Now I would like to do two things:
1. I would like to count number of numerical terms in this entry
(e.g. 4 in the above example). Is there any way of counting + sign in
cell and showing the result in a different cell?
2. I would like to see the content of the above cell as is (i.e.,
=5+8+60+1) in another cell of a different worksheet of a workbook.
-Peter
|