Check if result is an integer?

G

Guest

I want to use Excel for calculation of primes. Is there a way to have Excel
check if the result of a division is an integer (i.e. a whole number, nothing
after the comma) or not? E.g. if 7/3 is integer then display yes else display
no.

I use Windows Office XP
 
N

Niek Otten

=MOD(A1,1)=0

or

=IF(MOD(A4,1)=0,"yes","no")

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


|I want to use Excel for calculation of primes. Is there a way to have Excel
| check if the result of a division is an integer (i.e. a whole number, nothing
| after the comma) or not? E.g. if 7/3 is integer then display yes else display
| no.
|
| I use Windows Office XP
 
B

Bob Phillips

=A1=INT(A1)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 

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