这个excel函数不会写,有学霸
同时按Alt和F11进入宏界面,点菜单的插入,模块,粘贴如下代码:
Sub hebing()
Dim i As Integer
For i = 1 To 15
Range(“D“ & i) = Format(Range(“A“ & i), “0。 00“) & Format(Range(“B“ & i), “0。00“) & Format(Range(“C“ & i), “0。00“)
Next i
End Sub
Sub fenkai()
Dim xStr() As String
Dim i As Integer
For i = 1 To 15
xStr = Split(Range(“...全部
同时按Alt和F11进入宏界面,点菜单的插入,模块,粘贴如下代码:
Sub hebing()
Dim i As Integer
For i = 1 To 15
Range(“D“ & i) = Format(Range(“A“ & i), “0。
00“) & Format(Range(“B“ & i), “0。00“) & Format(Range(“C“ & i), “0。00“)
Next i
End Sub
Sub fenkai()
Dim xStr() As String
Dim i As Integer
For i = 1 To 15
xStr = Split(Range(“D“ & i), “。
“)
Range(“E“ & i) = xStr(0) & “。“ & Left(xStr(1), 2)
Range(“F“ & i) = Mid(xStr(1), 3, 10) & “。“ & Left(xStr(2), 2)
Range(“G“ & i) = Mid(xStr(2), 3, 10) & “。
“ & Left(xStr(3), 2)
Next i
两个宏分别实现你的两个要求。收起