Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Need Help in counting + sign in a cell

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

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i change dollar sign to rupee sign in sales invoice vishal kohli Excel Discussion (Misc queries) 3 May 10th 07 02:06 PM
How to point to (select) a cell to the left from a cell where I enter the = equal sign? Dmitry Excel Discussion (Misc queries) 4 June 30th 06 06:49 AM
what does the # sign mean in a cell sherroc Excel Discussion (Misc queries) 7 February 13th 06 06:42 PM
XL invoice replace the dollar sign with euro sign Pamela casares New Users to Excel 2 December 16th 05 08:21 PM
# sign in a cell Poody Excel Discussion (Misc queries) 3 July 22nd 05 03:32 PM


All times are GMT +1. The time now is 10:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"