Question : formula to split data

Hi Experts

How would you split the following data XXXXX/YYYYY where x and y are numbers and letters. so the end result is to find the numbers before the forward slash i.e XXXXX ONLY and ignore the numbers aftter he / sign.

Answer : formula to split data

There you go i made a udf which does what you are looking for, Enclosed is the udf and workbook for your reference in B1 you need to use formula..

=splitdata(a1)

Saurabh...

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
Function splitdata(rng As Range)
    Dim k As Long

    For k = 1 To Len(rng.Value)
        If IsNumeric(Mid(rng.Value, k, 1)) = False And Mid(rng.Value, k, 1) <> "/" Then
            splitdata = splitdata & Mid(rng.Value, k, 1)
        Else
            Exit Function
        End If
    Next k

End Function
 
 
Random Solutions  
 
programming4us programming4us