Sub 提取并删除前200个字符()
Dim lastRow As Long
Dim i As Long
Dim originalValue As String
Dim extractedValue As String
lastRow = Cells(Rows.Count, "A").End(xlUp).Row ' 获取 A 列最后一行的行号
For i = 1 To lastRow
originalValue = Cells(i, "A").Value ' 保存原始值
extractedValue = Left(originalValue, 200) ' 提取前200个字符
Cells(i, "C").Value = extractedValue ' 保存到 C 列对应的单元格内
Cells(i, "A").Value = Mid(originalValue, 201) ' 删除原始值的前200个字符
Next i
End Sub
读完这篇文章后,您心情如何?