Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Betty P.
 
Posts: n/a
Default How do I enter formula for < or numbers.

I am trying to enter a formula in a worksheet. I want the formula to do the
following: IF A1=40 then enter 1, if less that 40 enter 0, OR IF A1=45 enter
2, if less that 45 but more than 40 enter 1, OR IF A1=50 enter 3, if less
than 50 but more than 45 enter 2......and so on until the final one reads if
65 or greater enter 6.
Please help.....
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default How do I enter formula for < or numbers.

Try this:
=IF((A1=40),FLOOR((A1-40)/5,1)+1,0)

Does that help?

***********
Regards,
Ron


"Betty P." wrote:

I am trying to enter a formula in a worksheet. I want the formula to do the
following: IF A1=40 then enter 1, if less that 40 enter 0, OR IF A1=45 enter
2, if less that 45 but more than 40 enter 1, OR IF A1=50 enter 3, if less
than 50 but more than 45 enter 2......and so on until the final one reads if
65 or greater enter 6.
Please help.....

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bpeltzer
 
Posts: n/a
Default How do I enter formula for < or numbers.

=MAX(MIN(6,INT((A1-35)/5)),0). Most of the work is done by int((a1-35)/5).
The rest contains the result to the range [0,6].

"Betty P." wrote:

I am trying to enter a formula in a worksheet. I want the formula to do the
following: IF A1=40 then enter 1, if less that 40 enter 0, OR IF A1=45 enter
2, if less that 45 but more than 40 enter 1, OR IF A1=50 enter 3, if less
than 50 but more than 45 enter 2......and so on until the final one reads if
65 or greater enter 6.
Please help.....

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default How do I enter formula for < or numbers.

Actually, these are shorter methods:
=MAX(INT(($A$1-35)/5),0)
or
=FLOOR(MAX(($A$1-35)/5,0),1)


***********
Regards,
Ron


"Ron Coderre" wrote:

Try this:
=IF((A1=40),FLOOR((A1-40)/5,1)+1,0)

Does that help?

***********
Regards,
Ron


"Betty P." wrote:

I am trying to enter a formula in a worksheet. I want the formula to do the
following: IF A1=40 then enter 1, if less that 40 enter 0, OR IF A1=45 enter
2, if less that 45 but more than 40 enter 1, OR IF A1=50 enter 3, if less
than 50 but more than 45 enter 2......and so on until the final one reads if
65 or greater enter 6.
Please help.....

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default How do I enter formula for < or numbers.

I just noticed the max criteria of 6 (I slow down when it gets late...sheesh):

Consequently, these would be appropriate:
=MIN(6,FLOOR(MAX(($A$1-35)/5,0),1))
or
=MIN(6,MAX(INT(($A$1-35)/5),0))

***********
Regards,
Ron


"Ron Coderre" wrote:

Actually, these are shorter methods:
=MAX(INT(($A$1-35)/5),0)
or
=FLOOR(MAX(($A$1-35)/5,0),1)


***********
Regards,
Ron


"Ron Coderre" wrote:

Try this:
=IF((A1=40),FLOOR((A1-40)/5,1)+1,0)

Does that help?

***********
Regards,
Ron


"Betty P." wrote:

I am trying to enter a formula in a worksheet. I want the formula to do the
following: IF A1=40 then enter 1, if less that 40 enter 0, OR IF A1=45 enter
2, if less that 45 but more than 40 enter 1, OR IF A1=50 enter 3, if less
than 50 but more than 45 enter 2......and so on until the final one reads if
65 or greater enter 6.
Please help.....



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Philip J Smith
 
Posts: n/a
Default How do I enter formula for < or numbers.

These guys are brilliant on formulae, but you might find the following easier
to understand.

On a new worksheet enter the following in cells a1:e7

0 0
40 1
45 2
50 3
55 4
60 5
65 6

Name this range as "Scores"

In any cell - say D4 enter a score.

In cell d5 type =vlookup(d4,Scores,2)

Anything below 40 will get a 0, anything greater than, 0r equal to 40 but
less than 45 will get a 1 and so on.

If the values you want to test are scores that need grading, then the
numbers 0 to 6 can be replaced by F to A respectively and the formula will
still work.

"Betty P." wrote:

I am trying to enter a formula in a worksheet. I want the formula to do the
following: IF A1=40 then enter 1, if less that 40 enter 0, OR IF A1=45 enter
2, if less that 45 but more than 40 enter 1, OR IF A1=50 enter 3, if less
than 50 but more than 45 enter 2......and so on until the final one reads if
65 or greater enter 6.
Please help.....

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default How do I enter formula for < or numbers.

"Philip J Smith" wrote:
These guys are brilliant on formulae, but you
might find the following easier to understand.
[....]
In cell d5 type =vlookup(d4,Scores,2)


Geesh, talk about killing an ant with a sledgehammer!
"Everything should be as simple as possible, but no
simpler." -- Einstein.




Anything below 40 will get a 0, anything greater than, 0r equal to 40 but
less than 45 will get a 1 and so on.

If the values you want to test are scores that need grading, then the
numbers 0 to 6 can be replaced by F to A respectively and the formula will
still work.

"Betty P." wrote:

I am trying to enter a formula in a worksheet. I want the formula to do the
following: IF A1=40 then enter 1, if less that 40 enter 0, OR IF A1=45 enter
2, if less that 45 but more than 40 enter 1, OR IF A1=50 enter 3, if less
than 50 but more than 45 enter 2......and so on until the final one reads if
65 or greater enter 6.
Please help.....

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Betty P.
 
Posts: n/a
Default How do I enter formula for < or numbers.

Thank you for all the help it was greatly appreciated, I will try the
formulas and see which works best for me.

"Ron Coderre" wrote:

Try this:
=IF((A1=40),FLOOR((A1-40)/5,1)+1,0)

Does that help?

***********
Regards,
Ron


"Betty P." wrote:

I am trying to enter a formula in a worksheet. I want the formula to do the
following: IF A1=40 then enter 1, if less that 40 enter 0, OR IF A1=45 enter
2, if less that 45 but more than 40 enter 1, OR IF A1=50 enter 3, if less
than 50 but more than 45 enter 2......and so on until the final one reads if
65 or greater enter 6.
Please help.....

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
Proper way to enter array formula Phil Excel Worksheet Functions 3 October 20th 05 02:44 PM
how to enter numbers value for calculation? Joanna Excel Worksheet Functions 5 August 25th 05 08:15 PM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM
I enter numbers and they are stored as text burkeville Excel Discussion (Misc queries) 5 December 3rd 04 01:59 AM
Display numbers only, no text formula Mira Excel Worksheet Functions 2 November 11th 04 01:54 AM


All times are GMT +1. The time now is 02:56 AM.

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"