|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
- Sub À­ÊÖ()
- Application.ScreenUpdating = False
- Application.Calculation = xlCalculationManual
- Dim i As Long
- For i = 3 To 1000
- Select Case Cells(i, 3)
- Case "AÐÍÀ­ÊÖ"
- Cells(i, 7) = (Left(Cells(i, 5), 3) / 2 - 20) & "*" & (Right(Cells(i, 5), 3) / 2 - 20)
- Case "BÐÍÀ­ÊÖ"
- Cells(i, 7) = (Left(Cells(i, 5), 3) * 2 + 20) & "*" & (Right(Cells(i, 5), 3) * 2 + 20)
- Case "CÐÍÀ­ÊÖ"
- Cells(i, 7) = (Left(Cells(i, 5), 3) - 30) & "*" & (Right(Cells(i, 5), 3) - 30)
- Case "DÐÍÀ­ÊÖ"
- Cells(i, 7) = (Left(Cells(i, 5), 3) - 20) & "*" & (Right(Cells(i, 5), 3) - 20)
- Case "EÐÍÀ­ÊÖ"
- Cells(i, 7) = (Left(Cells(i, 5), 3) / 3 - 10) & "*" & (Right(Cells(i, 5), 3) / 3 - 10)
- End Select
- If Cells(i + 1, 3) = "" Then Exit For
- Next
-
- Application.ScreenUpdating = True
- Application.Calculation = xlCalculationAutomatic
- End Sub
复制代码 |
|