Hi all,

I am trying to write some VBA to compare a rounded number with a rounded number for example I have 1 number 0.5302 and another showing as 0.5308 but both show as 53% on my spread sheet therefore they equal the same and I want them to they equal the same. but when I write my code it recognises 0.5308 as higher than 0.5302. How can I adapt my code so it recognises the outputs as the same? I attach part of my code below:-

If Sheets(s).Cells(x + 3, 11) = Cells(x + 3, 9) Then
With Sheets(s).Shapes.Range(Array("Green_" & x))
        .Top = rng.Top + 8
        .Left = rng.Left + 8
        Sheets(s).Shapes.Range(Array("Red_" & x)).Fill.Visible = msoFalse
        Sheets(s).Shapes.Range(Array("Red_" & x)).Line.Visible = msoFalse
        Sheets(s).Shapes.Range(Array("Amber_" & x)).Fill.Visible = msoFalse
        Sheets(s).Shapes.Range(Array("Amber_" & x)).Line.Visible = msoFalse
        Sheets(s).Shapes.Range(Array("Green_" & x)).Fill.Visible = msoTrue
        Sheets(s).Shapes.Range(Array("Green_" & x)).Line.Visible = msoTrue
    End With

Any help greatly appreciated.

Cheers,

James