View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default Excel VBA If statement question

Try:

=If(mod(m4,1)=0,"True","False")

HTH

" wrote:

I am trying to write an IF statement that will take another cell and
tell me if that cell is a whole number or not. The statemnet I
currently have that does not work is :

=IF(M4 = "*.*","1","0")

where M4 is a cell with a value (in my case 0.04). I am not sure if
the "*.*" is the correct syntax or not to find out if the number is
whole or not. Any insight would be appreciated.

Drew