View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Searching for low and high number

Hi,

I assume if there is an exact match you want that. with your lookup value in
D1

For the lower number

=LOOKUP(D1,A1:A8)

For the higher

=MIN(IF(A1:A8=D1,A1:A8))

The second formula is an array.
'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

Mike

"Mortir" wrote:



sorry made a slight mistake above:
- for 21, the solution should be 7 and 31 not 32