|
老师像这样上传就不会了
- Sub test()
- countrow = Sheet1.UsedRange.Cells(Sheet1.UsedRange.Rows.Count, 1).Row
- For i = 2 To countrow - 1
- stri = Sheet1.Range("A" & i)
- With Sheet1.Range("A" & i)
- Select Case Left(stri, 1)
- Case "$"
- .Value = Application.Text(Right(stri, Len(stri) - 1), "'$" & "0.00")
- Case "€"
- .Value = Application.Text(Right(stri, Len(stri) - 1), "'€" & "0.00")
- Case Else
- .Value = Application.Text(Right(stri, Len(stri) - 1), "'ㄓ" & "0.00")
- End Select
- .HorizontalAlignment = xlRight
- .VerticalAlignment = xlCenter
- .Columns.AutoFit
- End With
- Next
- End Sub
复制代码 |
|