Excel 比较2个小数点不超过4的数字

Excel 比较2个小数点不超过4的数字,excel,comparison,excel-2010,decimal-point,vba,Excel,Comparison,Excel 2010,Decimal Point,Vba,我需要比较最多有4位小数的软件版本(14.7.3.13)。我有一个静态列表,我正在比较电子表格中的值。如果电子表格中的值>=代码中的静态数字,我将突出显示该单元格。 我做这件事有困难。我假设我的问题是数据类型。我已将静态值声明为变量。我可以更改电子表格中的数据类型,但我不知道在电子表格上的代码中要使用什么数据类型。您能否按“.”字符拆分软件版本,然后比较每个版本的“段”?类似这样的内容: Dim value1() As String = version1.split(".") Dim value

我需要比较最多有4位小数的软件版本(14.7.3.13)。我有一个静态列表,我正在比较电子表格中的值。如果电子表格中的值>=代码中的静态数字,我将突出显示该单元格。
我做这件事有困难。我假设我的问题是数据类型。我已将静态值声明为变量。我可以更改电子表格中的数据类型,但我不知道在电子表格上的代码中要使用什么数据类型。

您能否按“.”字符拆分软件版本,然后比较每个版本的“段”?类似这样的内容:

Dim value1() As String = version1.split(".")
Dim value2() As String = version2.split(".")
Dim greatestVersion As String

greatestVersion = value1 ' Start with greatest version as value1

If version1 = version2 Then ' Check to see if they are both the same
    greatestVersion = "BOTH THE SAME!"
Else If ' If not the same then determine the bigger value
For i=0 To value1.count
    If value2[i] > value1[i] Then
        greatestVersion = version2
    End If
Next




End If

能否将其视为标准文本字段,然后在“.”字符上拆分软件版本,然后比较版本的每个“段”?