View Single Post
  #2   Report Post  
dominicb
 
Posts: n/a
Default


Good morning Implicity

Highlight all the range you want checking for decimals and then try
running this code:

Sub test()
occur = 0
On Error Resume Next
For Each rng In Selection
a = rng.Value
If Not a = Round(a, 0) Then
occur = occur + 1
If occur = 1 Then Set NotWhole = rng
If occur < 1 Then Set NotWhole = Union(NotWhole, rng)
End If
Next rng
NotWhole.Select
End Sub

This should highlight all your decimal numbers and ignore any whole
numbers. Once they're all selected just press delete. But BACK UP
BEFORE you do this - I've tested the code, but just in case it selects
something it shouldn't.

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=377658