Extracting whole numbers (+ - 0.02 or 0.01) & ending in .25, .50, .75

panyagak

Active Member
Joined
Feb 24, 2017
Messages
299
Dear ALL MrExcel

Formula for 1st problem is this:

=IF(ABS(ROUND(A1,0)-A1)<=0.02,"KEEP","DUMP").
(a) (The formula above also KEEPS 0.01s & 0.02s which I dont need). I need to incorporate an extra formula in it.

(b) I also need to extract all numbers ending in .25, .50 and .75 & need to incorporate it in the above formula:

ANY SINGLE EXTENDED FORMULA TO INCORPORATE THE 2 EXTRA CONDITIONS FOR SIMPLICITY?

Thanks.

Regards Patrick
 
AliGW

Hope it has worked on rows 7 & 8. Thanks for your efforts. Will try it out

Have a Super Easter Monday (Muslims or Indians celebrate it!!!??).

All in all thanks

Regards
Patrick in rural Kenya
 
Upvote 0

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Yes, it worked:

Excel 2016 (Windows) 32 bit
AB
DUMP
DUMP
KEEP
KEEP
KEEP
KEEP
KEEP
KEEP
DUMP

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: right"]0.01[/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]0.02[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]6.25[/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]34.5[/TD]

[TD="align: center"]5[/TD]
[TD="align: right"]8.75[/TD]

[TD="align: center"]6[/TD]
[TD="align: right"]9[/TD]

[TD="align: center"]7[/TD]
[TD="align: right"]1.98[/TD]

[TD="align: center"]8[/TD]
[TD="align: right"]5.99[/TD]

[TD="align: center"]9[/TD]
[TD="align: right"]9.26[/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: #DAE7F5"]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]B1[/TH]
[TD="align: left"]=IF(MROUND(ABS(A1),0.25)=ABS(A1),"KEEP",IF(ABS(A1)<=0.02,"DUMP",IF(ABS(ROUND(A1,0)-A1)<=0.02,"KEEP","DUMP")))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

Happy Easter to you, too.
 
Last edited:
Upvote 0
Thanks AliGW & co.

Refer to:
=IF(MROUND(ABS(A1),0.25)=ABS(A1),"KEEP",IF
(ABS(A1)<=0.02,"DUMP",IF(ABS(ROUND(A1,0)-
A1)<=0.02,"KEEP","DUMP")))

However, the formula returns "KEEP" for 0.00. Try on 0.00 on your PCs.

Please any modification?

Thanks.
 
Upvote 0
=IF(MROUND(ABS(A1),0.25)=ABS(A1),"KEEP",IF
(ABS(A1)<=0.02,"DUMP", IF
(ABS(A1)=0.00,"DUMP", IF(ABS(ROUND(A1,0)-
A1)<=0.02,"KEEP","DUMP"))))

Hope this helps!!
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,329
Members
452,635
Latest member
laura12345

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
Back
Top