Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This should be very simple, but I don't see how to do it without a macro:
How do you count the number of hyphens (for example) in a string? abc-de-a32-ej2-wkjew-w should give 5 we2-232if should give 1 wekjf2 should give 0 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
The below formula will do.
=LEN(A1)-LEN(SUBSTITUTE(A1,"-",)) If this post helps click Yes --------------- Jacob Skaria "Ken" wrote: This should be very simple, but I don't see how to do it without a macro: How do you count the number of hyphens (for example) in a string? abc-de-a32-ej2-wkjew-w should give 5 we2-232if should give 1 wekjf2 should give 0 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Wed, 10 Jun 2009 11:55:02 -0700, Ken wrote:
This should be very simple, but I don't see how to do it without a macro: How do you count the number of hyphens (for example) in a string? abc-de-a32-ej2-wkjew-w should give 5 we2-232if should give 1 wekjf2 should give 0 =len(str)-len(substitute(str,"-","") --ron |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Ah ... of course. Thank you both.
Ken This should be very simple, but I don't see how to do it without a macro: How do you count the number of hyphens (for example) in a string? abc-de-a32-ej2-wkjew-w should give 5 we2-232if should give 1 wekjf2 should give 0 =len(str)-len(substitute(str,"-","") --ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SUMPRODUCT to calculate unique occurences of string in column of d | Excel Discussion (Misc queries) | |||
Count Occurences | Excel Discussion (Misc queries) | |||
Count # of Occurences | Excel Discussion (Misc queries) | |||
count number of occurences within a string | Excel Worksheet Functions | |||
Count occurences between dates | Excel Worksheet Functions |