Excel VBA If statement question

  • Thread starter Thread starter gallupd
  • Start date Start date
G

gallupd

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
 
Drew,

I wasn't sure which result "1" would indicate:

=IF(INT(M4)=M4,"whole","fraction")

hth,

Doug
 

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

Similar Threads

Conditional formating question 2
How do you Combine Two IF formulas 4
VB If statement Help 0
HOW TO DO AN IF, IN A MACRO 18
Excel VBA 1
VBA Loop If statement 4
Formula Not Working 3
IF MAX formula using dates 2

Back
Top