View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Searching for low and high number

for high number
=INDEX(A1:A8,MATCH(B1,A1:A8,1)+1,0)


If the lookup_value *is* the high number that will return an error.


--
Biff
Microsoft Excel MVP


"muddan madhu" wrote in message
...
for low number
=INDEX(A1:A8,MATCH(B1,A1:A8,1),0)

for high number
=INDEX(A1:A8,MATCH(B1,A1:A8,1)+1,0)

On Jan 25, 10:55 pm, Mortir wrote:
I have the following example

A column with number of days:

days
3
7
31
61
91
181
271
365

Now i have a certain formula which returns to me a number of days -
for example 21. 21 belongs in between 7 and 31 in the days column. I
am looking for a formulas that would return this high and low number
of the interval in which my number belongs to:

- for 21, the solution should be 7 and 32,
- for 183, the solution should be 181 and 271
- and if the number equals one of the numbers in the column the
solution should be the exact number if i have 31 the solution should
be 31

is there a way to do this. thanx for your help!