Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF Macro / Function
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(B110,"0.5",IF(B110,"1"))) It doesn't look right? |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF Macro / Function
There is a contradiction here, first you say if 10 then set it to 0.5,
then you say if 10 then set to 1. Which should it be? -- __________________________________ HTH Bob "Kimmon" wrote in message ... 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(B110,"0.5",IF(B110,"1"))) It doesn't look right? |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF Macro / Function
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. "Bob Phillips" wrote: There is a contradiction here, first you say if 10 then set it to 0.5, then you say if 10 then set to 1. Which should it be? -- __________________________________ HTH Bob "Kimmon" wrote in message ... 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(B110,"0.5",IF(B110,"1"))) It doesn't look right? |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF Macro / Function
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 ======================== "Kimmon" wrote: 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(B110,"0.5",IF(B110,"1"))) It doesn't look right? |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF Macro / Function
Hi, thank you but no not really. I need either 0.5 or 1 as an answer, not
true or false? "xlm" wrote: 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 ======================== "Kimmon" wrote: 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(B110,"0.5",IF(B110,"1"))) It doesn't look right? |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF Macro / Function
I post before you have change your criteria.
ok try this =IF(AND(D15=200,D15<=300),0.5,IF(D15300,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 ======================== "kimmon" wrote: Hi, thank you but no not really. I need either 0.5 or 1 as an answer, not true or false? "xlm" wrote: 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 ======================== "Kimmon" wrote: 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(B110,"0.5",IF(B110,"1"))) It doesn't look right? |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF Macro / Function
Try this:
=IF(B1<5,0,IF(B1<10,0.5,1)) Hope this helps. Pete On Dec 9, 9:07*am, kimmon wrote: 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. "Bob Phillips" wrote: There is a contradiction here, first you say if 10 then set it to 0.5, then you say if 10 then set to 1. Which should it be? -- __________________________________ HTH Bob "Kimmon" wrote in message ... 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(B110,"0.5",IF(B110,"1"))) It doesn't look right?- Hide quoted text - - Show quoted text - |
#8
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF Macro / Function
Hi,
=+IF(AND(x5,x<10),0.5,1) "kimmon" wrote: Hi, thank you but no not really. I need either 0.5 or 1 as an answer, not true or false? "xlm" wrote: 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 ======================== "Kimmon" wrote: 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(B110,"0.5",IF(B110,"1"))) It doesn't look right? |
#9
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF Macro / Function
=((B15)+(B1=10))/2
"Kimmon" wrote: 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(B110,"0.5",IF(B110,"1"))) It doesn't look right? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Should I use a macro for this function? | Excel Discussion (Misc queries) | |||
Is there a Function or Macro for This? | Excel Discussion (Misc queries) | |||
Sub Macro vrs Function Macro Auto Start | Excel Discussion (Misc queries) | |||
macro or function? | Excel Discussion (Misc queries) | |||
Macro With IF Function | Excel Worksheet Functions |