+ Reply to Thread
Results 1 to 10 of 10

if < and >

  1. #1
    Forum Contributor
    Join Date
    02-19-2004
    Location
    San Francisco Bay Area
    MS-Off Ver
    Microsoft 365 Aps for enterprise.
    Posts
    241

    if < and >

    Hi All,
    What is the cyntax for "IF" statement

    I like to test a cell for a value > 29.7 and < 30.3

    Thanks for the help.
    Syed

  2. #2
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    You don't tell us what you want to do with the IF statement, but it would look something like this:

    =IF(AND(A1>29.7,A1<30.3),"In Range","Out of Range")

    Does this work for you?

    Bruce
    Bruce
    The older I get, the better I used to be.
    USA

  3. #3
    Dave Peterson
    Guest

    Re: if < and >

    =if(and(a1>29.7,a1<30.3),"between","not between")
    or
    =if(and(29.7<a1,a1<30.3),"between","not between")

    I think I like the second one. It kind of looks like A1 should be trapped
    between the two values.



    saziz wrote:
    >
    > Hi All,
    > What is the cyntax for "IF" statement
    >
    > I like to test a cell for a value > 29.7 and < 30.3
    >
    > Thanks for the help.
    > Syed
    >
    > --
    > saziz
    > ------------------------------------------------------------------------
    > saziz's Profile: http://www.excelforum.com/member.php...fo&userid=6350
    > View this thread: http://www.excelforum.com/showthread...hreadid=468308


    --

    Dave Peterson

  4. #4
    Biff
    Guest

    Re: if < and >

    Hi!

    Try this:

    =IF(AND(A1>29.7,A1<30.3),"yes","no")

    Biff

    "saziz" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi All,
    > What is the cyntax for "IF" statement
    >
    > I like to test a cell for a value > 29.7 and < 30.3
    >
    > Thanks for the help.
    > Syed
    >
    >
    > --
    > saziz
    > ------------------------------------------------------------------------
    > saziz's Profile:
    > http://www.excelforum.com/member.php...fo&userid=6350
    > View this thread: http://www.excelforum.com/showthread...hreadid=468308
    >




  5. #5
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    Quote Originally Posted by Dave Peterson
    =if(and(a1>29.7,a1<30.3),"between","not between")
    or
    =if(and(29.7<a1,a1<30.3),"between","not between")

    I think I like the second one. It kind of looks like A1 should be trapped
    between the two values.

    Dave Peterson
    Dave is into bondage? All righty, then. It gets the job done.

  6. #6
    Forum Contributor
    Join Date
    02-19-2004
    Location
    San Francisco Bay Area
    MS-Off Ver
    Microsoft 365 Aps for enterprise.
    Posts
    241
    Thank you all for help.
    Here is the scenario I am trying to fit your cyntax:

    If .Value < 30.3 Then
    .Offset(0, 1).Value = .Value

    if I use this "IF(AND.value(A1>29.7,A1<30.3)
    it gives me an error.

    Any idea?
    Thanks
    syed

    Quote Originally Posted by Biff
    Hi!

    Try this:

    =IF(AND(A1>29.7,A1<30.3),"yes","no")

    Biff

    "saziz" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi All,
    > What is the cyntax for "IF" statement
    >
    > I like to test a cell for a value > 29.7 and < 30.3
    >
    > Thanks for the help.
    > Syed
    >
    >
    > --
    > saziz
    > ------------------------------------------------------------------------
    > saziz's Profile:
    > http://www.excelforum.com/member.php...fo&userid=6350
    > View this thread: http://www.excelforum.com/showthread...hreadid=468308
    >

  7. #7
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,925
    Is this a worksheet function or a VBA statement? Your last post makes me think you are referring to a VBA statement which would look like

    If .value>29.7 and .value<30.3 then
    statement
    Else
    statement
    End if
    Last edited by MrShorty; 09-16-2005 at 06:01 PM.

  8. #8
    Dave Peterson
    Guest

    Re: if < and >

    Hmmmm.

    http://www.imdb.com/title/tt0119360/



    swatsp0p wrote:
    >
    > You don't tell us what you want to do with the IF statement, but it
    > would look something like this:
    >
    > =IF(AND(A1>29.7,A1<30.3),"In Range","Out of Range")
    >
    > Does this work for you?
    >
    > Bruce
    >
    > --
    > swatsp0p
    >
    > ------------------------------------------------------------------------
    > swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
    > View this thread: http://www.excelforum.com/showthread...hreadid=468308


    --

    Dave Peterson

  9. #9
    Forum Contributor
    Join Date
    02-19-2004
    Location
    San Francisco Bay Area
    MS-Off Ver
    Microsoft 365 Aps for enterprise.
    Posts
    241
    Thanks Mr. shorty. That solved my problem.
    Syed

  10. #10
    Forum Contributor
    Join Date
    01-11-2004
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    388
    Hi!

    Not being unkind, but it helps your helpers if you define the problem and its context as precisely as you can.

    Alf

+ 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