![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: May 2002
Location: Houston, TX
Posts: 7,184
|
I need to be able to count within a cell.
For example I have -M---FS and want to return 3. The column has for each day the appropriate letter where a customer has service. Any ideas? |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
=LEN(SUBSTITUTE(A1,"-","")) where A1 houses a value like -M---FS. |
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Posts: 363
|
Try the following custom funtion:
Function charcount(Arg As String) As Integer For x = 1 To Len(Arg) If LCase$(Mid(Arg, x, 1)) > "a" And LCase$(Mid(Arg, x, 1)) < "z" Then charcount = charcount + 1 End If Next End Function In your sheet type: =charcount(A1)
__________________
It's never too late to learn something new. Ricky |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|