Hello everybody!
I would like to go through the rows of a column using numeric variables to reference the parameters. But in doing so I can't use text functions, like Len () to count the characters in a cell, Left () and Right (), among others. How do I resolve this dilemma, is there a function that counts characters of any type?
Thank you for your attention, I'm waiting.
I would like to go through the rows of a column using numeric variables to reference the parameters. But in doing so I can't use text functions, like Len () to count the characters in a cell, Left () and Right (), among others. How do I resolve this dilemma, is there a function that counts characters of any type?
Thank you for your attention, I'm waiting.
VBA Code:
Sub F_Ribeiro()
Dim W As Worksheet
Dim xRow As Long
Dim lastRow As Long
Set W = Sheets("Sheet1")
lastRow = W.Range("A" & Rows.Count).End(xlUp).Row
For xRow = 2 To lastRow
If Len(W.Range("A" & xRow)) > 4 Then
W.Range("A" & xRow).Value = Right(W.Range("A" & xRow), 3)
End If
Next
End Sub