Checking for whole numbers in a worksheet

Joined
Oct 20, 2011
Messages
3
Reaction score
0
I have a worksheet nearly full of decimal and whole number values. I need to determine if a particular row contains whole numbers so the row can be deleted. Does anyone know how I can achieve this?
 
Joined
Jun 9, 2016
Messages
32
Reaction score
5
(B3=7.5, e.g.), B3 - INT(B3) ===> 7.5 -7=.5 <=== any difference greater zero means you had a decimal number.
B3=15.0 ===> 15.0 - 15=0 <===a difference of zero means you had a whole number. If you have a row where all the differences between the original number and its integer add up to zero, that row is all whole numbers and needs to be deleted.

{=IF(SUM(A9:G9-INT(A9:G9))=0,"DELETE ROW","")}
This is an array (CSE) formula and it WILL NOT WORK if you type the { and the }. Type everything but those (in cell H9, perhaps), then press Ctrl-Shift-Enter (hence the CSE).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top