简体   繁体   中英

excel to return result on index-small-if with multiple criteria


Dear Community,

I am currently stuck with a dilemma. I have built a tracking sheet for development work with our team that allowed us to manage and track tasks required for the completion of a requirement and software releases.

For each release i had tables that would populate a table containing relevation information for the different team members from a source sheet helping us with the tracking of our tasks and contained further automation for a burndown chart. I only consider myself a padawan regarding excel and largely built this sheet based on some google fu and trial & error. Now let us get to the details

Table Content

  • Request ID

  • Requirement ID

  • Effort

  • Release

  • etc.

Used Statement:

=IF(ISERROR(INDEX($J$1:$M$4;SMALL(IF($J$1:$J$4=$B$7;ROW($J$1:$M$4));ROW(1:1));4));"";INDEX($J$1:$M$4;SMALL(IF($J$1:$J$4=$B$7;ROW($J$1:$M$4));ROW(1:1));1))    

Unfortunately I do not know how I should go ahead from here. I expect to modify the statement so the return corresponds to a result satisfying both or more criteria ie only Release 2.0 and Requirement ID DFE1.

I have attempted nesting an IF statement as seen below but with no success.

=INDEX($J$1:$M$4;SMALL(IF($J$1:$J$4=$B$7;ROW($J$1:$M$4);IF($K$1:$K$4=$B$8;ROW($J$1:$M$4)));ROW(1:1));1)

Kindly suggest possible ways to go about this.

If you require any further details please do let me know.

If you are using Excel 2010 then you can use IFERROR rather than ISERROR to avoid repetition in the formula, so your original formula can be

=IFERROR(INDEX($J$1:$M$4;SMALL(IF($J$1:$J$4=$B$7;ROW($J$1:$M$4));ROW(1:1));1);"")

Then if you want to add additional conditions to that you can use * as a "pseudo AND" so for your two conditions that would be

=IFERROR(INDEX($J$1:$M$4;SMALL(IF(($J$1:$J$4=$B$7)*($K$1:$K$4=$B$8);ROW($J$1:$M$4));ROW(1:1));1);"")

More conditions can be added in the same way if required

That should work OK but for added "robustness" I would suggest this version where the first formula is in cell D2 (adjust as required).

=IFERROR(INDEX($J$1:$M$4;SMALL(IF(($J$1:$J$4=$B$7)*($K$1:$K$4=$B$8);ROW($J$1:$M$4)-MIN(ROW($J$1:$M$4))+1);ROWS(D$2:D2));1);"")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM