How do I return a text string when a calculation returns a non who

  • Thread starter Thread starter bcronin
  • Start date Start date
B

bcronin

I need to display text "You must order in case quantities" when

A1/B1 does not equal a whole number (A1 being case quantities and B1 being
quantity ordered)

I'm pulling my hair out and it's probably really simple.... sigh.

Thanks for any help!
Becki
 
Try this:

=IF(INT(A1/B1)=A1/B1,"","You must order in case quantities")

Hope this helps.

Pete
 
=IF(A1/B1<>INT(A1/B1),"You must order in case quantities",A1/B1)

If this post helps click Yes
 
Thanks! This returns a "1" when the amount is a whole number. How would I
modify it to return "Quantity Correct"?

Becki
 
Thanks Jacob. I entered
=IF(E10/F10<>INT(E10/F10),"You must order in case quantities",E10/F10)

and if the number is whole, I still get the "You must order in case
quantities"
Thanks,
Becki
 
Thanks Pete.

I entered
=IF(INT(E11/F11)=E11/F11,"","You must order in case quantities")
and if the number is a whole number, it still returns the string "You must
order...."

Thanks,
Becki
 
Well, I just copied your formula directly from your posting into cell
G11 of a blank sheet, put some numbers in E11 and F11, and it worked
fine for me.

Pete
 
It should be B1/A1...

=IF(MOD(B1/A1,1),"You must order in case quantities","Quantity Correct")

If this post helps click Yes
 
Back
Top