Thread: Index by Range
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max
 
Posts: n/a
Default Index by Range

"Biff" wrote:
........MATCH(A2,Sheet1!$B$1:$IV$1,1)+1)))

What happens when the lookup value is 60000?


Good point on the upper bound. My error. Thanks.

Put instead in B2, copy down:
=IF(A2="","",IF(A2=MAX(Sheet1!$B$1:$IV$1),SUM(OFF SET(Sheet1!$A$2:$A$100,,MATCH(A2,Sheet1!$B$1:$IV$1 ,1))),SUM(OFFSET(Sheet1!$A$2:$A$100,,MATCH(A2,Shee t1!$B$1:$IV$1,1)+1))))

Earlier sample construct revised (at same link)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---