View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
djc[_3_] djc[_3_] is offline
external usenet poster
 
Posts: 10
Default Finding Next Largest Number Based on Criteria

On Wednesday, February 27, 2013 9:02:32 PM UTC-8, Ben McClave wrote:
There may be an easier way, but this late into the night this is the method I came up with. Assuming your data is in cells A1:B10, you would enter this as an array formula (CTRL+Shift+Enter)into cell C1 and copy it down to cell C10.



=IF(COUNTIF($B$1:$B$10, "Oranges")= ROW(A1), SMALL(IF($B$1:$B$10="Oranges", $A$1:$A$10, 10^308), ROW(A1)), "")



Good luck



Ben


It works! Thank you Ben