+ Reply to Thread
Results 1 to 3 of 3

Excel VBA If statement question

Hybrid View

Guest Excel VBA If statement... 08-12-2005, 12:05 PM
Guest RE: Excel VBA If statement... 08-12-2005, 12:05 PM
Guest Re: Excel VBA If statement... 08-12-2005, 12:05 PM
  1. #1
    gallupd@aetna.com
    Guest

    Excel VBA If statement question

    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


  2. #2
    Toppers
    Guest

    RE: Excel VBA If statement question

    Try:

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

    HTH

    "gallupd@aetna.com" 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
    >
    >


  3. #3
    Doug Glancy
    Guest

    Re: Excel VBA If statement question

    Drew,

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

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

    hth,

    Doug

    <gallupd@aetna.com> wrote in message
    news:1123860505.187906.17280@z14g2000cwz.googlegroups.com...
    >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
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1