ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Return value based on criteria (https://www.excelbanter.com/excel-discussion-misc-queries/228329-return-value-based-criteria.html)

andiam24

Return value based on criteria
 
This formula works very nicely to return the specified occurrence (F91);
however, is there a way to modify it to return a value based on criteria?
Such as, if the value in say G90 is less than 0.2 or greater than 2.0 for the
first occurence then return the second occurrence?

=INDEX(ALTable,SMALL(IF(OFFSET(ALTable,0,0,ROWS(AL Table),1)=F90,
ROW(OFFSET(ALTable,0,0,ROWS(ALTable),1))-ROW(OFFSET(ALTable,0,0,1,1))+1,
ROW(OFFSET(ALTable,ROWS(ALTable)-1,0,1,1))+1),F91),2)

Thanks!


All times are GMT +1. The time now is 03:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com