Excel VBA: 删除 E 列第一个字符并放入 G 列
Sub DeleteFirstCharacter() Dim lastRow As Long Dim i As Long
'获取 E 列数据最后一行
lastRow = ActiveSheet.Cells(Rows.Count, "E").End(xlUp).Row
'循环遍历每一行
For i = 1 To lastRow
'检查 E 列单元格是否为空
If Not IsEmpty(Cells(i, "E")) Then
'删除第一个字符并将结果放入 G 列
Cells(i, "G") = Right(Cells(i, "E"), Len(Cells(i, "E")) - 1)
End If
Next i
End Sub
原文地址: https://www.cveoy.top/t/topic/mJ7H 著作权归作者所有。请勿转载和采集!