+ Reply to Thread
Results 1 to 12 of 12

if the value of a cell =

  1. #1
    Registered User
    Join Date
    03-03-2010
    Location
    jounieh
    MS-Off Ver
    Excel 2007
    Posts
    10

    if the value of a cell =

    Hi,

    I'm trying to have a cell return a value if the value of another cell = a certain number

    this is what I'm trying to do

    If Cell A2=3 then the value of Cell A3=1
    If A2=6 then A3=2
    If A2=9 then A3=3

    What's the way to work this? Thank you for the help

  2. #2
    Forum Contributor trucker10's Avatar
    Join Date
    07-22-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003 / 2007 / 2010 prof +
    Posts
    149

    Re: if the value of a cell =

    Quote Originally Posted by RCG View Post

    What's the way to work this? Thank you for the help
    This way ?
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-03-2010
    Location
    jounieh
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: if the value of a cell =

    No trucker it's not working for me this way, I'm still trying, I hope you'll figure what was wrong with your code. Thanks for helping

  4. #4
    Forum Contributor trucker10's Avatar
    Join Date
    07-22-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003 / 2007 / 2010 prof +
    Posts
    149

    Re: if the value of a cell =

    Quote Originally Posted by RCG View Post
    I hope you'll figure what was wrong with your code.
    The code is in Dutch ; > ,

    =IF($A$2=3,1,IF($A$2=6,2,IF($A$2=9,3,""))) ?
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-03-2010
    Location
    jounieh
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: if the value of a cell =

    Trucker thank you very much, this works now however led me to another issue to resolve which I realized when this worked, I guess it's getting more complicated now. :D

    when 3 = 1
    When 6 = 2
    When 9 = 2

    what happens when it's 4? it's back to zero instead of staying on 1, I'm going to try with greater or equal. Should this work?

  6. #6
    Forum Contributor trucker10's Avatar
    Join Date
    07-22-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003 / 2007 / 2010 prof +
    Posts
    149

    Re: if the value of a cell =

    You can do everything, if you try!
    Attached Files Attached Files
    Last edited by trucker10; 04-13-2010 at 06:07 PM.

  7. #7
    Registered User
    Join Date
    03-03-2010
    Location
    jounieh
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: if the value of a cell =

    Quote Originally Posted by RCG View Post
    Trucker thank you very much, this works now however led me to another issue to resolve which I realized when this worked, I guess it's getting more complicated now. :D

    when 3 = 1
    When 6 = 2
    When 9 = 2

    what happens when it's 4? it's back to zero instead of staying on 1, I'm going to try with greater or equal. Should this work?

    Tried this, not helping, my result stays 1

    =IF($U$2>=3,1,IF($U$2>=6,2,IF($U$2>=9,3,"")))

    Is this the way for Greater or equal?

  8. #8
    Registered User
    Join Date
    03-03-2010
    Location
    jounieh
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: if the value of a cell =

    Thank you trucker, I'm trying although I'm in dire need to sleep where I am

    I'll explain the principle behind it

    if someone is 3 times tardy he'll be considered 1 day abscent.

    so for every 3 Tardy I have 1 Day abscent

    if someone is 4 times tardy I'd like to show 1 day abscent until the number reaches 6 then it'll become 2 Day abscent.

    That's why I figured I should used >= but i'm not getting it right.

  9. #9
    Forum Contributor trucker10's Avatar
    Join Date
    07-22-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003 / 2007 / 2010 prof +
    Posts
    149

    Re: if the value of a cell =

    =if(($u$2>=3),1,if(($u$2>=6),2,if($u$2>=9,3,""))) ? ? Try this one
    Attached Files Attached Files
    Last edited by trucker10; 04-13-2010 at 06:21 PM.

  10. #10
    Registered User
    Join Date
    03-03-2010
    Location
    jounieh
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: if the value of a cell =

    Nope, but anyways thank you trucker, will get some rest, maybe tomorrow I'll manage to figure it out

  11. #11
    Registered User
    Join Date
    04-13-2010
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: if the value of a cell =

    Tried and tested.
    This formula worked.

    =IF(($A1>=9),3,IF(($A1>=6),2,IF($A1>=3,1,0)))


    Whatever IF command you give first, gets precedence.
    Changes from earlier formula:
    - If Cell value less than 3, get filled as 0
    - Removal of the second $ sign means you can drag down and apply the formula over a column of data.

  12. #12
    Registered User
    Join Date
    03-03-2010
    Location
    jounieh
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: if the value of a cell =

    Quote Originally Posted by cimmind View Post
    Tried and tested.
    This formula worked.

    =IF(($A1>=9),3,IF(($A1>=6),2,IF($A1>=3,1,0)))


    Whatever IF command you give first, gets precedence.
    Changes from earlier formula:
    - If Cell value less than 3, get filled as 0
    - Removal of the second $ sign means you can drag down and apply the formula over a column of data.
    Cimmind thank you, this works for me.

+ 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