ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF Macro / Function (https://www.excelbanter.com/excel-worksheet-functions/212957-if-macro-function.html)

Kimmon

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?

Bob Phillips[_3_]

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?




Kimmon

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?





xlm

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?


Kimmon

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?


xlm

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?


Pete_UK

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 -



Eduardo

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?


Teethless mama

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?



All times are GMT +1. The time now is 09:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com