dbmathis
Well-known Member
- Joined
- Sep 22, 2002
- Messages
- 1,064
Hi All,
I am working with rating scales and I need to be able to check to see if a floating point number is >= another number with VBA. I only need 2 decimal places for my comparisons. I
For example I on my worksheet I have two different cells that have 40 in them. and do >= it returns false.
Code looks like:
Is there a way to do this?
I am working with rating scales and I need to be able to check to see if a floating point number is >= another number with VBA. I only need 2 decimal places for my comparisons. I
For example I on my worksheet I have two different cells that have 40 in them. and do >= it returns false.
Code looks like:
Code:
For rating_scale_range = ws2.Cells(Rows.Count, numeric_value_column).End(xlUp).Row To row_number_rating_scale Step -1
If ws2.Cells(row_number_ratings, raw_normalized_rating_column) >= ws2.Cells(rating_scale_range, normalized_threshold_value_column) Then
' Numeric
ws2.Cells(row_number_ratings, calculated_manager_numeric_rating_column) = ws2.Cells(rating_scale_range, numeric_value_column)
' Normalized
ws2.Cells(row_number_ratings, calculated_manager_normalized_rating_column) = ws2.Cells(rating_scale_range, normalized_value_column): Exit For
End If
Next
Is there a way to do this?