Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
count number of occurances between 2 values | Excel Worksheet Functions | |||
Count number of values | Excel Discussion (Misc queries) | |||
count the number of values when two conditions are met | Excel Worksheet Functions | |||
Count number of values | Excel Worksheet Functions | |||
Count number of values in a cell | Excel Worksheet Functions |