Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
TriFiV
 
Posts: n/a
Default Cell can only equal Whole Number

I need set up a formula so that if the answer is not a whole number, an error
message will show. Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default Cell can only equal Whole Number

Let's say we are interested in =A1/A2 being an integer, use:

=IF(INT(A1/A2)*A2=A1,A1/A2,"ERROR")

so if A1 is 12 and A2 is 6 you will see 2
if A1 is 13 and A2 is 6 you will see ERROR


The general form is :
=IF(INT(A1)=A1,A1,"ERROR")
--
Gary's Student


"TriFiV" wrote:

I need set up a formula so that if the answer is not a whole number, an error
message will show. Thank you.

  #3   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph
 
Posts: n/a
Default Cell can only equal Whole Number

"TriFiV" wrote in message
...
I need set up a formula so that if the answer is not a whole number, an
error
message will show. Thank you.


=IF(MOD(your formula,1)=0,your formula, "Error")
--
David Biddulph


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
count each cell that have a number and take that number and count. Vick Excel Discussion (Misc queries) 3 May 19th 06 01:51 AM
Deferring conditional formatting? Pheasant Plucker® Excel Discussion (Misc queries) 14 March 17th 06 08:17 PM
Instead of a negative number, I'd like to show zero... Dr. Darrell Excel Worksheet Functions 6 December 7th 05 08:21 PM
First Number in a Cell Kelly O. Excel Worksheet Functions 4 August 14th 05 03:31 PM
Defining a number in a cell by text then subtracting it by the tex Crowraine Excel Worksheet Functions 1 December 16th 04 07:49 AM


All times are GMT +1. The time now is 05:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"