Find Value

R2

New Member
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

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Geert

New Member
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
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

Cheers. Chris

Replies
18
Views
490
Replies
12
Views
234
Replies
4
Views
78
Replies
9
Views
211
Replies
2
Views
148

1,148,008
Messages
5,744,324
Members
423,862
Latest member
ExcelUserX

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.

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

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