+ Reply to Thread
Results 1 to 4 of 4

[SOLVED] how do I make multiple "if" statements

  1. #1
    AccessNewbie
    Guest

    [SOLVED] how do I make multiple "if" statements

    I want to do something like this:
    if cell D4 is "23" then "45"
    or
    if cell D4 is "24" then "48"
    or
    if cell D4 is "26" then "97"
    etc.
    So the formula in one cell is looking for the value in another cell and
    returning the appropriate response.

    Thanks!

  2. #2
    Roger Govier
    Guest

    Re: how do I make multiple "if" statements

    Hi

    =IF(D4=23,45,IF(D4=24,48,IF(D4=26,97,"")))

    The formula returns Null "" if the value in D4 is not equal to any of
    the values posted.
    Change the "" to whatever you would like in this case.

    Regards

    Roger Govier



    AccessNewbie wrote:

    >I want to do something like this:
    >if cell D4 is "23" then "45"
    >or
    >if cell D4 is "24" then "48"
    >or
    >if cell D4 is "26" then "97"
    >etc.
    >So the formula in one cell is looking for the value in another cell and
    >returning the appropriate response.
    >
    >Thanks!
    >
    >


  3. #3
    George Gee
    Guest

    Re: how do I make multiple "if" statements

    One way:

    Type in the cell where you wish to see the result:

    =IF(D4=23,45,IF(D4=24,48,IF(D4=26,97)))

    However, you do not specify what happens if D4 is other than these three
    values!

    George Gee


    AccessNewbie wrote:
    > I want to do something like this:
    > if cell D4 is "23" then "45"
    > or
    > if cell D4 is "24" then "48"
    > or
    > if cell D4 is "26" then "97"
    > etc.
    > So the formula in one cell is looking for the value in another cell
    > and returning the appropriate response.
    >
    > Thanks!




  4. #4
    Gary''s Student
    Guest

    RE: how do I make multiple "if" statements

    =(D4=23)*45+(D4=24)*48+(D4=26)*97

    No IFs required.
    --
    Gary's Student


    "AccessNewbie" wrote:

    > I want to do something like this:
    > if cell D4 is "23" then "45"
    > or
    > if cell D4 is "24" then "48"
    > or
    > if cell D4 is "26" then "97"
    > etc.
    > So the formula in one cell is looking for the value in another cell and
    > returning the appropriate response.
    >
    > Thanks!


+ 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