Closed Thread
Results 1 to 4 of 4

Help with formula

  1. #1
    Registered User
    Join Date
    12-18-2007
    Posts
    53

    Help with formula

    Hi Guys
    I have another question similar to my last post.
    In cell A1 if I have a value of 599 or less I need cell A2 to produce a value of 1
    And similar if cell A1 has a value of 600 or more I need cell A2 to produce a value of 2. I tried to build something from the last formula you guys gave me along the lines of

    =IF(A1<=599,A1=1)
    But it’s not working for me.
    Thanks for your help so far.
    Dodge.

  2. #2
    Registered User
    Join Date
    02-09-2005
    Posts
    79

    Re: Help with formula

    Dodge,

    This is syntax for the IF function in Excel:

    =If( condition, value_if_true, value_if_false )

    If the condition (A1 <= 599) is true, then the value stored in value_if_true is returned. If not, the value stored in value_if_false is returned. In your case, you have to set value_if_true to 1 and value_if_false to 2.

    The formula to be used in cell A2 is,

    =If(A1<=599,1,2)

  3. #3
    Registered User
    Join Date
    12-18-2007
    Posts
    53

    Re: Help with formula

    Quote Originally Posted by vioravis View Post
    Dodge,

    This is syntax for the IF function in Excel:

    =If( condition, value_if_true, value_if_false )

    If the condition (A1 <= 599) is true, then the value stored in value_if_true is returned. If not, the value stored in value_if_false is returned. In your case, you have to set value_if_true to 1 and value_if_false to 2.

    The formula to be used in cell A2 is,

    =If(A1<=599,1,2)
    Thanks for that Vio.
    I am just amazed at what you can do with this program.
    This forum is great for quick help.
    Can you suggest a good book I buy so I can start to understand formulas.
    Cheers Dodge.

  4. #4
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264

    Re: Help with formula

    Quote Originally Posted by DODGE View Post
    Thanks for that Vio.
    I am just amazed at what you can do with this program.
    This forum is great for quick help.
    Can you suggest a good book I buy so I can start to understand formulas.
    Cheers Dodge.
    An alternative would be:

    =(A1>=600)+1

    Which makes use of the fact that False is equivalent to zero and True is equivalent to 1 in mathematical operations in worksheet formulae.

    John Walkenbach produces a good book on formulas, but in all honesty I think just reading the questions (and trying to answer them yourself) is the best learning any one could have.

    Richard
    Richard Schollar
    Microsoft MVP - Excel

Closed 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