Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
xlm xlm is offline
external usenet poster
 
Posts: 55
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
xlm xlm is offline
external usenet poster
 
Posts: 55
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default 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
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
Should I use a macro for this function? dwny Excel Discussion (Misc queries) 3 March 18th 08 10:25 PM
Is there a Function or Macro for This? Marilyn Excel Discussion (Misc queries) 6 November 6th 07 03:21 AM
Sub Macro vrs Function Macro Auto Start Pat Excel Discussion (Misc queries) 7 June 6th 07 09:53 PM
macro or function? CMD Excel Discussion (Misc queries) 0 October 4th 06 02:00 PM
Macro With IF Function marello Excel Worksheet Functions 0 November 10th 05 03:55 PM


All times are GMT +1. The time now is 01:48 PM.

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

About Us

"It's about Microsoft Excel"