,我重新试了下,出现这个提示:编译错误,在END sub ,END fumction或END属性后面只能出现注释。以下为代码内容,可以帮我看看是哪里要修改吗,谢谢。
Sub text()
Application.ScreenUpdating = False
Sub demo()
Dim i As Integer
For i = 5 To 2600
If InStr(Cells(i, "c").Value, "合计") > 0 Or InStr(Cells(i, "c").Value, "小计") > 0 Or InStr(Cells(i, "c").Value, "总计") > 0 Then
Else
Cells(i, "h") = Cells(i, "h").Value
End If
Next i
End Sub
Application.ScreenUpdating = True
End Sub
'这样改试一下
Sub text()
Application.ScreenUpdating = False
Dim i As Integer
For i = 5 To 2600
If InStr(Cells(i, "c").Value, "合计") > 0 Or InStr(Cells(i, "c").Value, "小计") > 0 Or InStr(Cells(i, "c").Value, "总计") > 0 Then
Else
Cells(i, "h") = Cells(i, "h").Value
End If
Next i
Application.ScreenUpdating = True
End Sub