Home 
Search 
Today's Posts 
#1




if value equals whole number then ...
I need to write a conditional statement that does the following:
If the result of <formula = a whole number, then <formula2, else <formula3 I have all the formulas working I just don't know how to writeup that first condition, if the resulting value of the formula is a whole number then do this, else that. Pls help, thanks. 
#2




if value equals whole number then ...
Assuming <formula is in A1, then try this:
=IF(INT(A1)=A1,<formula2,<formula3)) INT returns the integer portion of A1. Another way would be: =IF(MOD(A1,1)=0,<formula2,<formula3)) MOD returns the remainder after dividing A1 by 1. Hope this helps. Pete On Mar 19, 4:40 pm, bd wrote: I need to write a conditional statement that does the following: If the result of <formula = a whole number, then <formula2, else <formula3 I have all the formulas working I just don't know how to writeup that first condition, if the resulting value of the formula is a whole number then do this, else that. Pls help, thanks. 
#3




if value equals whole number then ...
=if(int(a1)=a1,....
or =if(int(formula1)=formula1,formula2,formula3) bd wrote: I need to write a conditional statement that does the following: If the result of <formula = a whole number, then <formula2, else <formula3 I have all the formulas working I just don't know how to writeup that first condition, if the resulting value of the formula is a whole number then do this, else that. Pls help, thanks.  Dave Peterson 
#4




if value equals whole number then ...
Sorry,
my penultimate closing brackets should be in both formulae, i.e.: =IF(INT(A1)=A1,<formula2,<formula3) =IF(MOD(A1,1)=0,<formula2,<formula3) Pete On Mar 19, 4:47 pm, "Pete_UK" wrote: Assuming <formula is in A1, then try this: =IF(INT(A1)=A1,<formula2,<formula3)) INT returns the integer portion of A1. Another way would be: =IF(MOD(A1,1)=0,<formula2,<formula3)) MOD returns the remainder after dividing A1 by 1. Hope this helps. Pete On Mar 19, 4:40 pm, bd wrote: I need to write a conditional statement that does the following: If the result of <formula = a whole number, then <formula2, else <formula3 I have all the formulas working I just don't know how to writeup that first condition, if the resulting value of the formula is a whole number then do this, else that. Pls help, thanks. Hide quoted text   Show quoted text  
Reply 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Forum  
equals the actual number...not text ????  Excel Worksheet Functions  
assign a number value to a text. ie, PL equals .5  New Users to Excel  
how to run a macro when a calculation equals a certin number  Excel Worksheet Functions  
Entered text value equals a number I specify in another cell  Excel Worksheet Functions  
custom filter does not work when selecting 'equals' X AND 'equals'  Excel Discussion (Misc queries) 