For Each c In Range("A2:A157")
If (Left(c, 1) = "P" Or Left(c, 1) = "T") And IsNumeric(Right(c, 6)) And Len(c) >= 5 Then
c = "Found It" 'i know this overwrites the value
End If
Next c
我想写"发现它"在同一行但列E
我无法解决这个问题。
答案 0 :(得分:5)
使用.Offset
For Each c In Activesheet.Range("A2:A157")
If (Left(c, 1) = "P" Or Left(c, 1) = "T") And IsNumeric(Right(c, 6)) And Len(c) >= 5 Then
c.Offset(,4) = "Found It" ' i know this overwrites the value
End If
Next c
答案 1 :(得分:3)
使用:
Range("E" & c.Row).Value = "Found It"