#1   Report Post  
Posted to microsoft.public.excel.misc
KarenYM
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default 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" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.misc
KarenYM
 
Posts: n/a
Default 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" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default if function

You're welcome. Thanks for the feedback!

Biff

"KarenYM" wrote in message
...
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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a Custom Excel Function to Calculate Gini Coefficients [email protected] Excel Worksheet Functions 3 February 21st 06 10:15 PM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Hyperlinks using R[1]C[1] and offset function in its cell referenc Elijah-Dadda Excel Worksheet Functions 0 March 5th 05 03:31 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM


All times are GMT +1. The time now is 04:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"