Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I am analysing some string data mostly for numeric values, but want to
remove those values that look like dates (e.g. 12/12/2008). Part of the analysis means that I must count the number of occurrences on the value "/" within the string. Does anyone know of a function that would give me the count of the number of instances of "/" or any other string portion? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try
=LEN(A1)-LEN(SUBSTITUTE(A1,"/","")) Mike "Stephen Allen" wrote: I am analysing some string data mostly for numeric values, but want to remove those values that look like dates (e.g. 12/12/2008). Part of the analysis means that I must count the number of occurrences on the value "/" within the string. Does anyone know of a function that would give me the count of the number of instances of "/" or any other string portion? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
With the text value in A1, use:
=LEN(A1)-LEN(SUBSTITUTE(A1,"/","")) this will give the count of slashes in the cell. NOTE the data must be text and not a Date nor formulaic divide -- Gary''s Student - gsnu200816 "Stephen Allen" wrote: I am analysing some string data mostly for numeric values, but want to remove those values that look like dates (e.g. 12/12/2008). Part of the analysis means that I must count the number of occurrences on the value "/" within the string. Does anyone know of a function that would give me the count of the number of instances of "/" or any other string portion? |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=(LEN(A1)-LEN(SUBSTITUTE(A1,"/","")))/LEN("/")
Obviously the division by LEN("/") is unnecessary if the string portion you are looking for is a single character, but it allows for the more general case if you were looking for a longer string portion. -- David Biddulph "Stephen Allen" wrote in message ... I am analysing some string data mostly for numeric values, but want to remove those values that look like dates (e.g. 12/12/2008). Part of the analysis means that I must count the number of occurrences on the value "/" within the string. Does anyone know of a function that would give me the count of the number of instances of "/" or any other string portion? |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you all. It works a treat.
On Nov 26, 1:30*pm, Stephen Allen wrote: |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change 3 letter text string to a number string | Excel Discussion (Misc queries) | |||
counting the number of instances of a string within another string | Excel Worksheet Functions | |||
Splitting a text string into string and number | Excel Discussion (Misc queries) | |||
to search for a string and affect data if it finds the string? | Excel Worksheet Functions | |||
how to count the nr of occurrences of a text string in a cell rang | Excel Worksheet Functions |