I have a excel with column A. In this i have multiple rows with different values ABCD43423 like that. I need last 5 digit from that A column and write into another B column for each row.
I am using for each row its working but taking time. Any another approach i can use. plz help
For Each row As DataRow In dt.Rows
Dim originalValue As String = row("Values").ToString()
If originalValue.Length >= 5 Then
row("Digits") = originalValue.Substring(originalValue.Length - 5)
Else
row("Digits") = originalValue
End If
Next