title: Excel not recognizing values as equal
body: <p>I have a table of values that I am trying to pull a number from by using a for loop that chooses the right table column based a value that was input into my spreadsheet. The input value (FvX2) is rounded to the nearest tenths place using the Ceiling function. This is then compared to values in the table by increasing the column number until the rounded value in the table equals the rounded number input into the spreadsheet. My problem is excel will not recognize when the two values are equal and never returns a value for Fvcl. I think this has something to do with the ceiling function but don't know how to get around it. Any ideas? Input value is 0.52 and is rounded to 0.6. Table values start at 0.1 and increase to 0.6 by increments of 0.1. Excel will not return Fvcl when FvX2 equals table value.</p>
  <pre><code>Dim FvX1 As Double
  Dim FvX2 As Double
  Dim Fvcl As Double
  
  FvX2 = WorksheetFunction.Ceiling(Worksheets(&quot;Sheet1&quot;).Range(&quot;B7&quot;).Value, 0.1)
  FvX1 = FvX2 - 0.1
  
  For j = 0 To 5
     
      If Worksheets(&quot;Tables&quot;).Cells(11, 2 + j).Value = FvX2 Then
          Fvcl = 2 + j 
      End If
  Next j
  </code></pre>