+ Reply to Thread
Results 1 to 5 of 5

If Statement?

  1. #1
    Registered User
    Join Date
    03-21-2006
    Posts
    13

    If Statement?

    Hey everyone,

    =IF(A1=0,9,A1-1)
    This formulas says if A1=0, make it 9 and subtract 1

    How do I make it say if A1 equals 0, make A2= 5 and if A1=5 make A2=0

    But there are 5 conditions. They mirror each other. Example: a 0 is a 5 and a 5 is a 0.

    0=5, 5=0
    1= 6, 6=1
    2=7, 7=2
    3=8, 8=3
    4=9, 9=4
    How do I make the cell meet all of these conditions.

    Thank you for your help.

  2. #2
    Bob Phillips
    Guest

    Re: If Statement?

    =CHOOSE(A1+1,5,6,7,8,9,0,1,2,3,4)

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "tenaj" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hey everyone,
    >
    > =IF(A1=0,9,A1-1)
    > This formulas says if A1=0, make it 9 and subtract 1
    >
    > How do I make it say if A1 equals 0, make A2= 5 and if A1=5 make A2=0
    >
    > But there are 5 conditions. They mirror each other. Example: a 0 is a
    > 5 and a 5 is a 0.
    >
    > 0=5, 5=0
    > 1= 6, 6=1
    > 2=7, 7=2
    > 3=8, 8=3
    > 4=9, 9=4
    > How do I make the cell meet all of these conditions.
    >
    > Thank you for your help.
    >
    >
    > --
    > tenaj
    > ------------------------------------------------------------------------
    > tenaj's Profile:

    http://www.excelforum.com/member.php...o&userid=32691
    > View this thread: http://www.excelforum.com/showthread...hreadid=536799
    >




  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996
    Tenaj

    I think this does what you want:

    For a value in A1

    B1: =MOD(A1+5,10)

    Does that help?

    Regards,
    Ron

  4. #4
    Registered User
    Join Date
    03-21-2006
    Posts
    13
    Quote Originally Posted by Bob Phillips
    =CHOOSE(A1+1,5,6,7,8,9,0,1,2,3,4)

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "tenaj" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hey everyone,
    >
    > =IF(A1=0,9,A1-1)
    > This formulas says if A1=0, make it 9 and subtract 1
    >
    > How do I make it say if A1 equals 0, make A2= 5 and if A1=5 make A2=0
    >
    > But there are 5 conditions. They mirror each other. Example: a 0 is a
    > 5 and a 5 is a 0.
    >
    > 0=5, 5=0
    > 1= 6, 6=1
    > 2=7, 7=2
    > 3=8, 8=3
    > 4=9, 9=4
    > How do I make the cell meet all of these conditions.
    >
    > Thank you for your help.
    >
    >
    > --
    > tenaj
    > ------------------------------------------------------------------------
    > tenaj's Profile:

    http://www.excelforum.com/member.php...o&userid=32691
    > View this thread: http://www.excelforum.com/showthread...hreadid=536799
    >
    Thank You Bob Phillips! Superb!!!!!!!!!! I could have never figured that out.

  5. #5
    Registered User
    Join Date
    03-21-2006
    Posts
    13
    Quote Originally Posted by Ron Coderre
    Tenaj

    I think this does what you want:

    For a value in A1

    B1: =MOD(A1+5,10)

    Does that help?

    Regards,
    Ron
    Thank you Ron. I didn't figure out how to use it. Maybe I did something wrong. The formula didn't generate anything but I have a formula now that does exactly what I need. Thank you for you time and help.

+ 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