From: michael.beckinsale on 14 Jan 2010 07:22 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
From: Stefi on 14 Jan 2010 07:37 On Jan 14, 1:22 pm, "michael.beckinsale" <michael.beckins...(a)ntlworld.com> 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
From: michael.beckinsale on 14 Jan 2010 07:51 Hi Stef, Thanks very much, works like a dream. I would never thought of doing that way! Regards Michael
From: Stefi on 14 Jan 2010 10:48 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 > > . >
From: Rick Rothstein on 14 Jan 2010 12:02 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" <michael.beckinsale(a)ntlworld.com> wrote in message news:dcd931bd-b69f-4ddd-8c78-be069a6b6275(a)m3g2000yqf.googlegroups.com... > Hi Stef, > > Thanks very much, works like a dream. > > I would never thought of doing that way! > > Regards > > Michael >
|
Next
|
Last
Pages: 1 2 Prev: Return value from cell info Next: Print Spreadsheet to PDF file with Excel 1997 |