With "," as decimal separator


I think that 3,3 is a number. In the immediate window ?Vartype (3,3) = 5 or Double

?Vartype (3.3) is probably an error, but ?Vartype("3.3") = 8 or String


So the String Criteria1:=">=0,2779" would work since Excel can convert that to a valid test for the number = 0,2779

So Criteria1:=">=0.2779" would probably still work but not return anything since there is no string "0.2779" in the data to filter


I don't think it would matter if you .Replace the "," by "."



See #2 below

http://www.oaltd.co.uk/ExcelProgRef/...rogRefCh22.htm

The Rules for Working with Excel

1.Pass values to Excel in their natural format if possible (i.e. don't convert dates / numbers / Booleans to strings if you don't have to). If you have strings, convert them yourself before passing them to Excel.
2.When you have to convert numbers and dates to strings for passing to Excel (such as in criteria for AutoFilter or .Formula strings),always explicitly convert the data to a US-formatted string, using Trim(Str(MyNumber)), or the sNumToUS() function shown earlier, for all number and date types. Excel will then use it correctly and convert it to the local number/date formats.
3.Avoid using Date literals (e.g. #1/3/2001#) in your code. It is better to use the VBA DateSerial(), or the Excel DATE() functions, which are not ambiguous.
4.If possible, use the date number instead of a string representation of a date. Numbers are much less prone to ambiguity (though not immune).
5.When writing formulas in code to be put into a cell (using the .Formula property), create the string using English functions. Excel will translate them to the local Office language for you.
6.When setting number formats or using the Format() function, use US formatting characters, e.g. ActiveCell.NumberFormat = "dd mmm yyyy". Excel will translate these to the local number format for you.
7.When reading information from a worksheet, using .Formula, .NumberFormat etc, Excel will supply it using English formulas and US format codes, regardless of the local Excel language.

Function sNumToUS(vValue As Variant, Optional bUseDATEFunction) As String
' *****************************************************
' *
' * Function Name: sNumToUS
' *
' * Input:    vValue - a variant containing the number to convert.
' *              Can be:
' *              a number  - to be converted to a string with US formats
' *              a date    - to be converted to a string in mm/dd/yyyy format
' *              a Boolean – converted to the strings "True" or "False"
' *
' *           bUseDATEFunction - an optional Boolean for handling dates
' *           False (or missing) - returns a date string in mm/dd/yyyy format
' *           True               - returns a date as DATE(yyyy,mm,dd)
' *
' * Output:   The input as a string in US regional format
' *
' * Purpose:  Explicitly converts an item to a string in US regional formats
' *
' *****************************************************

   Dim sTmp As String

   'Don't accept strings or arrays as input
   If TypeName(vValue) = "String" Then Exit Function
   If Right(TypeName(vValue), 2) = "()" Then Exit Function

   If IsMissing(bUseDATEFunction) Then bUseDATEFunction = False

   'Do we want it returned as Excel's DATE() function
   '(which we can't do with strings)?
   If bUseDATEFunction Then

      'We do, so build the Excel DATE() function string
      sTmp = "DATE(" & Year(vValue) & "," & Month(vValue) & "," & _
         Day(vValue) & ")"
   Else
      'Is it a date type?
      If TypeName(vValue) = "Date" Then
         sTmp = Format(vValue, "mm""/""dd""/""yyyy")
      Else
         'Convert number to string in US format and remove leading space
         sTmp = Trim(Str(vValue))

         'If we have fractions, we don't get a leading zero, so add one.
         If Left(sTmp, 1) = "." Then sTmp = "0" & sTmp
         If Left(sTmp, 2) = "-." Then sTmp = "-0" & Mid(sTmp, 2)
      End If
   End If

  'Return the US formatted string
   sNumToUS = sTmp
End Function