IF Macro / Function

  • Thread starter Thread starter Kimmon
  • Start date Start date
K

Kimmon

PLEASE help, I need to create a Macro urgent and don't know how:

QUESTION:

If cell x <5 or >10 x = 0.5
If cell x >10 x = 1

My attempt:

=IF(B1<5,"0.5",IF(B1>10,"0.5",IF(B1>10,"1")))

It doesn't look right?
 
Sorry, it is meant to say

If cell x >5 or <10 x = 0.5
If cell x >10 x = 1

It is to be used to calculate lunch hours, employees working more than 5hrs
but less than 10hrs get 1/2 hr lunch, but employees working longer than 10hrs
get 1hr lunch.
 
try this

=IF(B2<=5,0.5,IF(B2>=10,1))

Does this do what you want?
--

Thank You

cheers,

========================
please click the Yes button if this help
========================
 
Hi, thank you but no not really. I need either 0.5 or 1 as an answer, not
true or false?
 
I post before you have change your criteria.

ok try this

=IF(AND(D15>=200,D15<=300),0.5,IF(D15>300,1,"not in criteria"))

change the range and the message to suit yours.

HTH
--

Thank You

cheers,

========================
please click the Yes button if this help
========================
 
Back
Top