Auch wieder so ein Ding! Hoffe ich habe verstanden was Du willst. Split gibt zunächst Strings zurück. Wenn Du sie mit <> vergleichen willst mußt Du sie in Zahlen zurückverwandeln:
Option Explicit
Sub test()
Dim x As Variant, x1 As Variant, x2 As Variant
Dim y As Variant, y1 As Variant, y2 As Variant
Dim z As Variant
x = ActiveSheet.Range("A1")
y = ActiveSheet.Range("A2")
z = ">"
If x = y Then
z = "="
Debug.Print (z)
End If
If IsNumeric(x) And Not IsNumeric(y) Then
If InStr(1, x, " ", vbBinaryCompare) <> 0 Then
y1 = Split(y, " ")
y2 = CSng(y1(1))
If x = y2 Then z = ">"
If x = y2 Then z = "="
Debug.Print (z)
End If
End If
If IsNumeric(y) And Not IsNumeric(x) Then
If InStr(1, x, " ", vbBinaryCompare) <> 0 Then
x1 = Split(x, " ")
x2 = CSng(x1(1))
If y > x2 Then z = ""
If x2 = y Then z = "="
Debug.Print (z)
End If
End If
If Not IsNumeric(y) And Not IsNumeric(x) Then
If InStr(1, x, " ", vbBinaryCompare) <> 0 And InStr(1, y, " ", vbBinaryCompare) <> 0 Then
x1 = Split(x, " ")
x2 = CSng(x1(1))
y1 = Split(y, " ")
y2 = CSng(y1(1))
If y2 > x2 Then z = ""
If x2 = y2 Then z = "="
Debug.Print (z)
End If
End If
Cells(1, 2) = z
End Sub
Severus |