delete data in cell after specific character

后端 未结 6 1962
無奈伤痛
無奈伤痛 2021-01-17 16:23

I have data in cells A1:A1000. It is a list of names followed by a small note, like this:

  • sam\" fast
  • nick\" long
  • tom\" quick
<
6条回答
  •  走了就别回头了
    2021-01-17 16:51

    Sub Macro1()
        For Row = 1 To 1000
           S = Range("A" & Row).Cells.Value
           Pos = InStr(S, Chr(34))
           If Pos > 0 Then Range("A" & Row).Cells.Value = Left(S, Pos - 1)
        Next
    End Sub
    

提交回复
热议问题