Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional formatting help

Status
Not open for further replies.

osx99

Technical User
Apr 9, 2003
250
GB

I am writing some values to cells in excel via VBA which are to 2 decimal places. I want to flag some of these to identify they have been calculated.

The way I thought I could do this was to add a small number to the end

Eg.
Standard value = 23.08
Calculated value = 23.08000001

Then use conditional formatting to identify the 0.00000001

To test I tried the following first in excel, In cell

A5 = 23.08546
B5 =ROUND(A6,2) = 23.09
C5 =B5+0.00000001 = 23.09000001
Conditional formatting of C5 =($C$5-$B$5)=0.00000001

But this doesn't work - has anyone any ideas why?

Thanks,
Os
 
Have you tried c5-b5 > 0.0000001

Canadian eh! Check out the new social forum Tek-Tips in Canada.
With the state of the world today, monkeys should get grossly insulted when humans claim to be their decendents
 
I tried c5-b5 >= 0.0000001 but that didn't work either.

Very strange..?

I have found a workaround though =len(c5)>5
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top