Pretty simple function, take the data in the expected range, do some stuff, then do some other stuff and assign that other stuff to ActiveCell.Offset(0,1).Value
Nope. Error 1004.
But wait. You want to know what's in that cell? Oh that's the random data you put in there. Change the data? Uh....nope nope 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
Maybe I'm just code blind from sitting in front of the computer too long... Help please.