非常简单的功能,将数据放在预期范围内,做一些事情, 然后做一些其他的东西并将其他东西分配给ActiveCell.Offset(0,1).Value
不。错误1004。
但是等等。你想知道那个牢房里有什么?哦那是你放在那里的随机数据。 改变数据?呃......不高尚的nope nope nope ...
Function fixData(rng As Range) As String
Dim feet As Integer, inches As Integer
'On Error Resume Next
feet = DatePart("m", rng.Value)
inches = inches + (feet * 12)
Debug.Print ActiveCell.Offset(0, 1).Value & ", Inches = " & inches
ActiveCell.Offset(0, 1).Value = inches
'Debug.Print DatePart("m", rng.Value) & "'" & DatePart("d", rng.Value) & """"
fixData = DatePart("m", rng.Value) & "'" & DatePart("d", rng.Value) & """"
If Err Then
Debug.Print "error " & Err.Number
End If
End Function
也许我只是坐在电脑前太长时间的代码盲... 请帮助。