Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
Could anybody provide the vba code to count the number of * contained in the string of a cell. The string has leading 'spaces' TIA Regards Michale |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Jan 14, 1:22*pm, "michael.beckinsale"
wrote: Hi all, Could anybody provide the vba code to count the number of * contained in the string of a cell. The string has leading 'spaces' TIA Regards Michale If the string is in C1 occursnumber = Len(Range("C1")) - Len(Replace(Range("C1"), "*", "")) Regards, Stefi |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Stef,
Thanks very much, works like a dream. I would never thought of doing that way! Regards Michael |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You are welcome! Thanks for the feedback!
Clicking the YES button will be appreciated. Stefi €˛michael.beckinsale€¯ ezt Ć*rta: Hi Stef, Thanks very much, works like a dream. I would never thought of doing that way! Regards Michael . |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Another way to count the asterisks (just so you can see that VB is rich with possibilities) is this...
NumberOfAsterisk = UBound(Split(Range("C1"), "*")) -- Rick (MVP - Excel) "michael.beckinsale" wrote in message ... Hi Stef, Thanks very much, works like a dream. I would never thought of doing that way! Regards Michael |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Jan 14, 6:02*pm, "Rick Rothstein"
wrote: Another way to count the asterisks (just so you can see that VB is rich with possibilities) is this... NumberOfAsterisk = UBound(Split(Range("C1"), "*")) -- Rick (MVP - Excel) "michael.beckinsale" wrote in ... Hi Stef, Thanks very much, works like a dream. I would never thought of doing that way! Regards Michael- Hide quoted text - - Show quoted text - That's really tricky! Stefi |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count Consecutive string of same number | Excel Worksheet Functions | |||
Count based on single number in string | Excel Worksheet Functions | |||
How to count the number of occurrence within string? | Excel Discussion (Misc queries) | |||
count number of letters in a string | Excel Worksheet Functions | |||
count number of occurences within a string | Excel Worksheet Functions |