
Por exemplo: quando leio um código QR, ele mostra:
Column A1
vbmsavchjas asdhgaskhdgaskhdg_INX7642854858625
mas estou interessado apenas nos últimos caracteres:
Column B1
INX7642854858625
Posso usar posteriormente em uma coluna auxiliar a fórmula =left, mas me pergunto se existe outra opção para mostrar aquela parte do código durante a varredura, de alguma forma para filtrar o código durante a varredura e retornar apenas a parte desejada na célula.
Provavelmente algum código de macro?
Responder1
Dim OneCell As Range
For Each OneCell in Range("A:A")
If IsEmpty(OneCell) Then
Exit For
Else
OneCell.Offset(0,1).Value = Split(OneCell.Value, "_")(1)
End If
Next