Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Count number of values

In a cell I have this values

;1,23;2,5;5,5;6,5; etc......

How can I, using VBA count how many values there are, separated by ;
(semicolon)


Knut Egil


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Count number of values

=LEN(A1)-LEN(SUBSTITUTE(A1,";","")).

If there is an ; at start and finish, just subtract one. If there are
neither, add 1.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"DS NTE" wrote in message
...
In a cell I have this values

;1,23;2,5;5,5;6,5; etc......

How can I, using VBA count how many values there are, separated by ;
(semicolon)


Knut Egil




  #3   Report Post  
Posted to microsoft.public.excel.programming
RC- RC- is offline
external usenet poster
 
Posts: 12
Default Count number of values

Using VBA

Private Sub CountMeUP()
Dim MyNumber As Integer
Dim MyValue As String
Dim MyArray As Variant

MyValue = ActiveCell.Value

MyArray = Split(MyValue, ";")

MyNumber = UBound(MyArray)


End Sub


HTH


"Bob Phillips" wrote in message
...
=LEN(A1)-LEN(SUBSTITUTE(A1,";","")).

If there is an ; at start and finish, just subtract one. If there are
neither, add 1.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"DS NTE" wrote in message
...
In a cell I have this values

;1,23;2,5;5,5;6,5; etc......

How can I, using VBA count how many values there are, separated by ;
(semicolon)


Knut Egil






  #4   Report Post  
Posted to microsoft.public.excel.programming
RC- RC- is offline
external usenet poster
 
Posts: 12
Default Count number of values

Sorry for the double post

Using VBA

Private Sub CountMeUP()
Dim MyNumber As Integer
Dim MyValue As String
Dim MyArray As Variant

MyValue = ActiveCell.Value

MyArray = Split(MyValue, ";")

MyNumber = UBound(MyArray)


End Sub


HTH


"DS NTE" wrote in message
...
In a cell I have this values

;1,23;2,5;5,5;6,5; etc......

How can I, using VBA count how many values there are, separated by ;
(semicolon)


Knut Egil



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Count number of values

Thank you !!!!
Works perfectly!!!

knut egil
"RC-" skrev i melding
...
Sorry for the double post

Using VBA

Private Sub CountMeUP()
Dim MyNumber As Integer
Dim MyValue As String
Dim MyArray As Variant

MyValue = ActiveCell.Value

MyArray = Split(MyValue, ";")

MyNumber = UBound(MyArray)


End Sub


HTH


"DS NTE" wrote in message
...
In a cell I have this values

;1,23;2,5;5,5;6,5; etc......

How can I, using VBA count how many values there are, separated by ;
(semicolon)


Knut Egil





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
count number of occurances between 2 values Peters Excel Worksheet Functions 3 June 12th 09 02:17 AM
Count number of values da Excel Discussion (Misc queries) 2 April 30th 09 10:49 PM
count the number of values when two conditions are met Sophie D. Excel Worksheet Functions 3 May 9th 08 09:50 AM
Count number of values Mary Excel Worksheet Functions 1 October 4th 05 09:00 PM
Count number of values in a cell nyc_doc Excel Worksheet Functions 3 July 31st 05 12:34 AM


All times are GMT +1. The time now is 11:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"