View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
GerryK
 
Posts: n/a
Default How do I create a function to search a range for a number and...

With limited information, here is an example you can adjust:
Put some text in A1 to F1
Put some numbers in A2 to F2

Then in a cell somewhere put:
=INDEX($A$1:$F$1,MATCH(LARGE(A2:F2,2),A2:F2,))

This will look for the second largest number from row 2 and return the
adjacent text from row 1.

HTH
GerryK

"NECCExcel" wrote:

then return the value of the cell next to that number to a given cell?