+ Reply to Thread
Results 1 to 7 of 7

IF Function

  1. #1
    HRMSN
    Guest

    IF Function

    I am trying to use the IF function to assess the following:

    If any of five or so cells has a number in it (any number) then place in
    this cell where the formula is, a label corresponding to the source cell that
    has a number in it.

    For instance, if my staff person indicated they used 5 hours of vacation
    time because they placed the number 5 in a specific cell, then I want the
    letter V to be placed here.

    I believe I know what to do, but what might be the simplest way to help me
    is answering this. Is there a symbor or something that will indicate that
    any number will do, or is there a symbor that is opposite of "="?

    Hope this makes sense...

    HR Specialist

  2. #2
    Registered User
    Join Date
    09-16-2003
    Location
    Waiau Pa NZ
    Posts
    81
    a nested if?
    this may help

    enter in cell F1
    =IF(A1>0,"O",IF(B1>0,"1.5",IF(C1>0,"2T",IF(D1>0,"S",IF(E1>0,"V","")))))

    this assumes that only one cell of the five has a number
    Greetings from New Zealand
    Bill Kuunders

  3. #3
    Chris Lavender
    Guest

    Re: IF Function

    ISNUMBER function will differentiate between numbers and text.

    <> is the opposite of =


    HTH
    Best rgds
    Chris Lav


    "HRMSN" <[email protected]> wrote in message
    news:[email protected]...
    > I am trying to use the IF function to assess the following:
    >
    > If any of five or so cells has a number in it (any number) then place in
    > this cell where the formula is, a label corresponding to the source cell

    that
    > has a number in it.
    >
    > For instance, if my staff person indicated they used 5 hours of vacation
    > time because they placed the number 5 in a specific cell, then I want the
    > letter V to be placed here.
    >
    > I believe I know what to do, but what might be the simplest way to help me
    > is answering this. Is there a symbor or something that will indicate that
    > any number will do, or is there a symbor that is opposite of "="?
    >
    > Hope this makes sense...
    >
    > HR Specialist




  4. #4
    HRMSN
    Guest

    Re: IF Function

    Hey Bill,

    Just out of curiosity, can ya make it work if more than one has a number. I
    have always thought that it would not be possible, or a complete programming
    nightmare.

    "bill k" wrote:

    >
    > a nested if?
    > this may help
    >
    > enter in cell F1
    > =IF(A1>0,"O",IF(B1>0,"1.5",IF(C1>0,"2T",IF(D1>0,"S",IF(E1>0,"V","")))))
    >
    > this assumes that only one cell of the five has a number
    >
    >
    > --
    > bill k
    >
    >
    > ------------------------------------------------------------------------
    > bill k's Profile: http://www.excelforum.com/member.php...nfo&userid=821
    > View this thread: http://www.excelforum.com/showthread...hreadid=481998
    >
    >


  5. #5
    Registered User
    Join Date
    09-16-2003
    Location
    Waiau Pa NZ
    Posts
    81
    You would then use the "AND" or the "OR" functions.
    What do you want to show if there are more than one?

    An example of the "AND" function


    =IF(AND(A4<0,B4>0),"yes","no")

  6. #6
    HRMSN
    Guest

    Re: IF Function

    What I have is a leave sheet designed in Excel. Leave used is entered
    (currently) by hand on sheet B in cells that reference the day that the leave
    was used. Sheet A pulls the totals of these days into a nice legible format.
    It is the "by hand" part I am fixing.

    I now have it set up so that the types of leaves used are automatically
    pulled from another Excel file (that being the timesheet itself) onto sheet B
    of the leave worksheet. The problem has always been, either manually or
    automated, that it does not work, if someone uses say 3 hours of vacation,
    and 2 hours of sick leave on the same day, because the whole setup is
    designed to consider only one type of leave.

    Hope this makes sense. It isn't the greatest problem to solve, one that I
    would have let lie by the wayside because of the amount of time I will save
    with everything else, and the small number of times I have to worry about it.
    But if it makes sense, and you know the solution, then have at it. And
    Thanks.

    "bill k" wrote:

    >
    > You would then use the "AND" or the "OR" functions.
    > What do you want to show if there are more than one?
    >
    > An example of the "AND" function
    >
    >
    > =IF(AND(A4<0,B4>0),"yes","no")
    >
    >
    > --
    > bill k
    >
    >
    > ------------------------------------------------------------------------
    > bill k's Profile: http://www.excelforum.com/member.php...nfo&userid=821
    > View this thread: http://www.excelforum.com/showthread...hreadid=481998
    >
    >


  7. #7
    Registered User
    Join Date
    09-16-2003
    Location
    Waiau Pa NZ
    Posts
    81
    Sounds like you already know the answer.
    You would need to change the setup so that you can account for
    more than one type of leave per day in the first place.
    It should be by codes such as ord 1.5 and 2T SP PAL.
    You will then still have to get your colleagues to enter the code somewhere, rather then using the cell's location. This would make it more "secure".
    No "accidental" faulty returns.
    Good Luck

+ 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