Private Sub RefEdit1_KeyDown(KeyCode As Integer, ByVal Shift As Integer)
Dim strFirstCellReference As String
Static refType As Long
If KeyCode & "-" & Shift = "84-4" Then
Rem cmd+t on mac
With RefEdit1
On Error Resume Next
If TypeName(Range(RefEdit1.Text)) <> "Range" Then
On Error GoTo 0
Rem entry is not a range address, do nothing
Else
On Error GoTo 0
strFirstCellReference = Split(.Text, ":")(0)
Select Case Len(strFirstCellReference) - Len(Replace(strFirstCellReference, "$", vbNullString))
Case 0: refType = xlRelative
Case 2: refType = xlAbsolute
End Select
refType = (refType Mod 4) + 1
.Value = Application.ConvertFormula(.Text, xlA1, xlA1, refType)
End If
End With
End If
End Sub