Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88854

Can someone explain what this code is doing line by line?

$
0
0
 Public Function FastCut(s As String)
       'returns first n chars which fit pattern *nn?
       Dim x As Long
       Dim flag As Boolean
       Dim a As String
       For x = 1 To Len(s)
           a = a & Mid(s, x, 1)
           If IsNumeric(Right(a, 1)) Then flag = True
           If (flag And Not IsNumeric(Right(a, 1))) Then Exit For
       Next x
       FastCut = a

       End Function

Viewing all articles
Browse latest Browse all 88854


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>