Find Value

R2

New Member
Joined
Oct 8, 2002
Messages
5
How to find or search a value that display 2 decimal places(e.g $525.97) but in reality has more than 2 decimal numbers(e.g.$525.96578)?

Ctrl + F don't work.

Thank you for the help.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Geert

New Member
Joined
Jun 5, 2002
Messages
17
Hi,

because ,256 changes in ,26 you should use ,2 and not ,26. Don't know if that's accurate enough.

Geert
 

ChrisUK

Well-known Member
Joined
Sep 3, 2002
Messages
675
Try this code

Set rng = Range("A1:A10")

For Each c In rng
If c.NumberFormat = "0.00" Then
sNumberString = Str(c.Value)
If InStr(1, sNumberString, ".") Then
nLength = Len(sNumberString)
If (nLength - InStr(1, sNumberString, ".") > 2) Then
'At this point the cell is formated to 2 decimal places
'but the number is more than this
'
'Do what you want here!
End If
End If
End If
Next
 

Forum statistics

Threads
1,148,018
Messages
5,744,355
Members
423,863
Latest member
teehexcel

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top