+ Reply to Thread
Results 1 to 4 of 4

if function

  1. #1
    KarenYM
    Guest

    if function

    Need Help! I need a simple solution to a simple problem but can't remember
    how to resolve this formula (i've not done formulas for 3 years- yikes!)
    Basically I need to identify if a person is "hourly", they receive "8" hours
    of vacation, if they are "salary", then they receive 16 hours of vacation. I
    don't know what would be the best way to resolve this. I used
    =if(A1="hourly",8,0).... but I could not remember how to check the cell for
    more than one "text" and give me a result based on the cell contents.
    A B
    1 hourly 8 (result)
    2 salary 16 (result)

    Can anyone help me with this thing?

  2. #2
    Biff
    Guest

    Re: if function

    Hi!

    If the cell can only have 2 possible values, either hourly or salary:

    =IF(A1="hourly",8,16)

    But that's not very robust. If A1 was empty or ANY value other than hourly
    the formula would still return 16. So, you should probably explicitly test
    for each possible value:

    =IF(A1="hourly",8,IF(A1="Salary",16,"")

    If A1 is any value other than hourly or salary the formula returns a blank.

    Biff

    "KarenYM" <[email protected]> wrote in message
    news:[email protected]...
    > Need Help! I need a simple solution to a simple problem but can't
    > remember
    > how to resolve this formula (i've not done formulas for 3 years- yikes!)
    > Basically I need to identify if a person is "hourly", they receive "8"
    > hours
    > of vacation, if they are "salary", then they receive 16 hours of vacation.
    > I
    > don't know what would be the best way to resolve this. I used
    > =if(A1="hourly",8,0).... but I could not remember how to check the cell
    > for
    > more than one "text" and give me a result based on the cell contents.
    > A B
    > 1 hourly 8 (result)
    > 2 salary 16 (result)
    >
    > Can anyone help me with this thing?




  3. #3
    KarenYM
    Guest

    Re: if function

    Biff, Hello. Thank you! I knew it was simple. I couldn't seem to remember
    how to view the result I needed. Once again, THANKS!!!
    karenYM


    "Biff" wrote:

    > Hi!
    >
    > If the cell can only have 2 possible values, either hourly or salary:
    >
    > =IF(A1="hourly",8,16)
    >
    > But that's not very robust. If A1 was empty or ANY value other than hourly
    > the formula would still return 16. So, you should probably explicitly test
    > for each possible value:
    >
    > =IF(A1="hourly",8,IF(A1="Salary",16,"")
    >
    > If A1 is any value other than hourly or salary the formula returns a blank.
    >
    > Biff
    >
    > "KarenYM" <[email protected]> wrote in message
    > news:[email protected]...
    > > Need Help! I need a simple solution to a simple problem but can't
    > > remember
    > > how to resolve this formula (i've not done formulas for 3 years- yikes!)
    > > Basically I need to identify if a person is "hourly", they receive "8"
    > > hours
    > > of vacation, if they are "salary", then they receive 16 hours of vacation.
    > > I
    > > don't know what would be the best way to resolve this. I used
    > > =if(A1="hourly",8,0).... but I could not remember how to check the cell
    > > for
    > > more than one "text" and give me a result based on the cell contents.
    > > A B
    > > 1 hourly 8 (result)
    > > 2 salary 16 (result)
    > >
    > > Can anyone help me with this thing?

    >
    >
    >


  4. #4
    Biff
    Guest

    Re: if function

    You're welcome. Thanks for the feedback!

    Biff

    "KarenYM" <[email protected]> wrote in message
    news:[email protected]...
    > Biff, Hello. Thank you! I knew it was simple. I couldn't seem to
    > remember
    > how to view the result I needed. Once again, THANKS!!!
    > karenYM
    >
    >
    > "Biff" wrote:
    >
    >> Hi!
    >>
    >> If the cell can only have 2 possible values, either hourly or salary:
    >>
    >> =IF(A1="hourly",8,16)
    >>
    >> But that's not very robust. If A1 was empty or ANY value other than
    >> hourly
    >> the formula would still return 16. So, you should probably explicitly
    >> test
    >> for each possible value:
    >>
    >> =IF(A1="hourly",8,IF(A1="Salary",16,"")
    >>
    >> If A1 is any value other than hourly or salary the formula returns a
    >> blank.
    >>
    >> Biff
    >>
    >> "KarenYM" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > Need Help! I need a simple solution to a simple problem but can't
    >> > remember
    >> > how to resolve this formula (i've not done formulas for 3 years-
    >> > yikes!)
    >> > Basically I need to identify if a person is "hourly", they receive "8"
    >> > hours
    >> > of vacation, if they are "salary", then they receive 16 hours of
    >> > vacation.
    >> > I
    >> > don't know what would be the best way to resolve this. I used
    >> > =if(A1="hourly",8,0).... but I could not remember how to check the cell
    >> > for
    >> > more than one "text" and give me a result based on the cell contents.
    >> > A B
    >> > 1 hourly 8 (result)
    >> > 2 salary 16 (result)
    >> >
    >> > Can anyone help me with this thing?

    >>
    >>
    >>




+ 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