ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to get the numbers above and below a number (https://www.excelbanter.com/excel-worksheet-functions/222791-how-get-numbers-above-below-number.html)

RAZ

How to get the numbers above and below a number
 
Hi, Thanks in advance if you can help.

I need two seperate equations to find the number above and below a specific
number from a list of numbers in accending order.

for example my specific number is 875, I need to find the number (only one
number) which is immediately less than 875, and the number that is
immidiately higher than 875 from the list below.

The two equations should give me 850 and 900 in seperate cells.

500
550
600
650
700
750
800
850
900
950
1000


Mike H

How to get the numbers above and below a number
 
Hi,

Try this for the lower number

=VLOOKUP(B1,A1:A11,1,TRUE)

and this for the higher

=MIN(IF(A1:A11=B1,A1:A11))

This is an array formula which must be entered with CTRL+Shift+Enter and NOT
'just enter. If you do it correctly then Excel will put curly brackets around
'the formula{}. You can't type these yourself. If you Edit the ranges
'then you must re-enter as An array

In the event of an exact match these both return the match


Mike

"Raz" wrote:

Hi, Thanks in advance if you can help.

I need two seperate equations to find the number above and below a specific
number from a list of numbers in accending order.

for example my specific number is 875, I need to find the number (only one
number) which is immediately less than 875, and the number that is
immidiately higher than 875 from the list below.

The two equations should give me 850 and 900 in seperate cells.

500
550
600
650
700
750
800
850
900
950
1000


T. Valko

How to get the numbers above and below a number
 
Try these array formulas** :

C2 = 875

For the next lowest number (if there is one):

=MAX(IF(A2:A12<C2,A2:A12))

For the next highest number (if there is one):

=MIN(IF(A2:A12C2,A2:A12))

If there isn't a next lowest/highest the respective formula will return 0.
For example, lookup 1200. There is no next highest so that formula will
return 0. The next lowest would be 1000. Lookup 490, there is no next lowest
so that formula would return 0. The next highest would be 500.

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"Raz" wrote in message
...
Hi, Thanks in advance if you can help.

I need two seperate equations to find the number above and below a
specific
number from a list of numbers in accending order.

for example my specific number is 875, I need to find the number (only one
number) which is immediately less than 875, and the number that is
immidiately higher than 875 from the list below.

The two equations should give me 850 and 900 in seperate cells.

500
550
600
650
700
750
800
850
900
950
1000




Glenn

How to get the numbers above and below a number
 
Raz wrote:
Hi, Thanks in advance if you can help.

I need two seperate equations to find the number above and below a specific
number from a list of numbers in accending order.

for example my specific number is 875, I need to find the number (only one
number) which is immediately less than 875, and the number that is
immidiately higher than 875 from the list below.

The two equations should give me 850 and 900 in seperate cells.

500
550
600
650
700
750
800
850
900
950
1000


Assuming your numbers in A1:A11 and 875 is in C4, array-enter (commit with
CTRL+SHIFT+ENTER) these two formulas:

=MAX(IF(A1:A11<C4,A1:A11,""))

=MIN(IF(A1:A11C4,A1:A11,""))

RAZ

How to get the numbers above and below a number
 
Thanks Mike, they work just perfectly.
Wondering if it is possible to do these by simple eqations (i mean not
having these curly brackets)


"Mike H" wrote:

Hi,

Try this for the lower number

=VLOOKUP(B1,A1:A11,1,TRUE)

and this for the higher

=MIN(IF(A1:A11=B1,A1:A11))

This is an array formula which must be entered with CTRL+Shift+Enter and NOT
'just enter. If you do it correctly then Excel will put curly brackets around
'the formula{}. You can't type these yourself. If you Edit the ranges
'then you must re-enter as An array

In the event of an exact match these both return the match


Mike

"Raz" wrote:

Hi, Thanks in advance if you can help.

I need two seperate equations to find the number above and below a specific
number from a list of numbers in accending order.

for example my specific number is 875, I need to find the number (only one
number) which is immediately less than 875, and the number that is
immidiately higher than 875 from the list below.

The two equations should give me 850 and 900 in seperate cells.

500
550
600
650
700
750
800
850
900
950
1000


Jarek Kujawa[_2_]

How to get the numbers above and below a number
 
for some time now I have not been able to see new posts
only answers to them
can anyone pls explain why?
am using Internet Explorer
thks

On 2 Mar, 18:28, "T. Valko" wrote:
Try these array formulas** :

C2 = 875

For the next lowest number (if there is one):

=MAX(IF(A2:A12<C2,A2:A12))

For the next highest number (if there is one):

=MIN(IF(A2:A12C2,A2:A12))

If there isn't a next lowest/highest the respective formula will return 0..
For example, lookup 1200. There is no next highest so that formula will
return 0. The next lowest would be 1000. Lookup 490, there is no next lowest
so that formula would return 0. The next highest would be 500.

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP

"Raz" wrote in message

...



Hi, Thanks in advance if you can help.


I need two seperate equations to find the number above and below a
specific
number from a list of numbers in accending order.


for example my specific number is 875, I need to find the number (only one
number) which is immediately less than 875, and the number that is
immidiately higher than 875 from the list below.


The two equations should give me 850 and 900 in seperate cells.


500
550
600
650
700
750
800
850
900
950
1000- Ukryj cytowany tekst -


- Poka¿ cytowany tekst -



Mike H

How to get the numbers above and below a number
 
Raz,

Not that I know of. I avoided an array in 1 of the formula by using vlookup.

Thanks for the feedback

Mike

"Raz" wrote:

Thanks Mike, they work just perfectly.
Wondering if it is possible to do these by simple eqations (i mean not
having these curly brackets)


"Mike H" wrote:

Hi,

Try this for the lower number

=VLOOKUP(B1,A1:A11,1,TRUE)

and this for the higher

=MIN(IF(A1:A11=B1,A1:A11))

This is an array formula which must be entered with CTRL+Shift+Enter and NOT
'just enter. If you do it correctly then Excel will put curly brackets around
'the formula{}. You can't type these yourself. If you Edit the ranges
'then you must re-enter as An array

In the event of an exact match these both return the match


Mike

"Raz" wrote:

Hi, Thanks in advance if you can help.

I need two seperate equations to find the number above and below a specific
number from a list of numbers in accending order.

for example my specific number is 875, I need to find the number (only one
number) which is immediately less than 875, and the number that is
immidiately higher than 875 from the list below.

The two equations should give me 850 and 900 in seperate cells.

500
550
600
650
700
750
800
850
900
950
1000


T. Valko

How to get the numbers above and below a number
 
There was a problem where posts made through the MS web interface have not
been getting picked up by news readers and other applications. For example,
I use Outlook Express to access the groups and since last Wed/Thur I was not
getting any posts made through the web interface. I only got posts made by
other news readers and Google Groups.

This seems to have been corrected sometime yesterday afternoon.

All seems to be working normally for the time being.

--
Biff
Microsoft Excel MVP


"Jarek Kujawa" wrote in message
...
for some time now I have not been able to see new posts
only answers to them
can anyone pls explain why?
am using Internet Explorer
thks

On 2 Mar, 18:28, "T. Valko" wrote:
Try these array formulas** :

C2 = 875

For the next lowest number (if there is one):

=MAX(IF(A2:A12<C2,A2:A12))

For the next highest number (if there is one):

=MIN(IF(A2:A12C2,A2:A12))

If there isn't a next lowest/highest the respective formula will return 0.
For example, lookup 1200. There is no next highest so that formula will
return 0. The next lowest would be 1000. Lookup 490, there is no next
lowest
so that formula would return 0. The next highest would be 500.

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the
SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP

"Raz" wrote in message

...



Hi, Thanks in advance if you can help.


I need two seperate equations to find the number above and below a
specific
number from a list of numbers in accending order.


for example my specific number is 875, I need to find the number (only
one
number) which is immediately less than 875, and the number that is
immidiately higher than 875 from the list below.


The two equations should give me 850 and 900 in seperate cells.


500
550
600
650
700
750
800
850
900
950
1000- Ukryj cytowany tekst -


- Poka¿ cytowany tekst -




T. Valko

How to get the numbers above and below a number
 
Will the number you're looking for *always* be within the range of your
listed numbers? In other words, there will never be a lookup value less than
the min value in the list and there will never be a lookup value greater
than the max value in the list.

--
Biff
Microsoft Excel MVP


"Raz" wrote in message
...
Thanks Mike, they work just perfectly.
Wondering if it is possible to do these by simple eqations (i mean not
having these curly brackets)


"Mike H" wrote:

Hi,

Try this for the lower number

=VLOOKUP(B1,A1:A11,1,TRUE)

and this for the higher

=MIN(IF(A1:A11=B1,A1:A11))

This is an array formula which must be entered with CTRL+Shift+Enter and
NOT
'just enter. If you do it correctly then Excel will put curly brackets
around
'the formula{}. You can't type these yourself. If you Edit the ranges
'then you must re-enter as An array

In the event of an exact match these both return the match


Mike

"Raz" wrote:

Hi, Thanks in advance if you can help.

I need two seperate equations to find the number above and below a
specific
number from a list of numbers in accending order.

for example my specific number is 875, I need to find the number (only
one
number) which is immediately less than 875, and the number that is
immidiately higher than 875 from the list below.

The two equations should give me 850 and 900 in seperate cells.

500
550
600
650
700
750
800
850
900
950
1000




Jarek Kujawa[_2_]

How to get the numbers above and below a number
 
thanks Biff
nothing seems to have changed for me till now
;-(

On 2 Mar, 18:53, "T. Valko" wrote:
There was a problem where posts made through the MS web interface have not
been getting picked up by news readers and other applications. For example,
I use Outlook Express to access the groups and since last Wed/Thur I was not
getting any posts made through the web interface. I only got posts made by
other news readers and Google Groups.

This seems to have been corrected sometime yesterday afternoon.

All seems to be working normally for the time being.

--
Biff
Microsoft Excel MVP

"Jarek Kujawa" wrote in message

...
for some time now I have not been able to see new posts
only answers to them
can anyone pls explain why?
am using Internet Explorer
thks

On 2 Mar, 18:28, "T. Valko" wrote:



Try these array formulas** :


C2 = 875


For the next lowest number (if there is one):


=MAX(IF(A2:A12<C2,A2:A12))


For the next highest number (if there is one):


=MIN(IF(A2:A12C2,A2:A12))


If there isn't a next lowest/highest the respective formula will return 0.
For example, lookup 1200. There is no next highest so that formula will
return 0. The next lowest would be 1000. Lookup 490, there is no next
lowest
so that formula would return 0. The next highest would be 500.


** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the
SHIFT
key then hit ENTER.


--
Biff
Microsoft Excel MVP


"Raz" wrote in message


...


Hi, Thanks in advance if you can help.


I need two seperate equations to find the number above and below a
specific
number from a list of numbers in accending order.


for example my specific number is 875, I need to find the number (only
one
number) which is immediately less than 875, and the number that is
immidiately higher than 875 from the list below.


The two equations should give me 850 and 900 in seperate cells.


500
550
600
650
700
750
800
850
900
950
1000- Ukryj cytowany tekst -


- Poka¿ cytowany tekst -- Ukryj cytowany tekst -


- Pokaż cytowany tekst -



Ron Rosenfeld

How to get the numbers above and below a number
 
On Mon, 2 Mar 2009 09:19:01 -0800, Raz wrote:

Hi, Thanks in advance if you can help.

I need two seperate equations to find the number above and below a specific
number from a list of numbers in accending order.

for example my specific number is 875, I need to find the number (only one
number) which is immediately less than 875, and the number that is
immidiately higher than 875 from the list below.

The two equations should give me 850 and 900 in seperate cells.

500
550
600
650
700
750
800
850
900
950
1000


What do you want to return if the Specific Number is exactly equal to a member
in the List of Numbers?

To return either the Same number (if Specific Number is present in the List) or
the next lowest number (if Specific Number is NOT present in the list):

=VLOOKUP(SpecNum,ListOfNums,1)

To return the next higher number:

=INDEX(ListOfNums,1+MATCH(SpecNum,ListOfNums),1)

The formulas will return error messages if specific number is not within the
range of the List of Numbers.
--ron


All times are GMT +1. The time now is 02:42 PM.

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