Index/Match | Index/Small Formula

chrono2483

Board Regular
Joined
Aug 23, 2014
Messages
164
Office Version
  1. 2016
Hello experts,

I am looking for assistance with my formula. I am using an index/small formula in the following scenario:

I am pasting raw data into Tab A, which includes status (example: Active, Inactive), and additional rows of data.
In Tab B, is a summary table, that pulls rows of data from Tab A.

In Tab A, there are multiple rows of Active, Inactive. What I want the formula to do is return the first instance row of Active, and as I drag down the formula, it will return the next example row of Active, etc.

This is the formula I have been trying to work with:

=INDEX(Sheet4!$B$2:$B$100, SMALL(IF(Sheet4!$F$2:$F$100=$B$4, ROW(Sheet4!$F$2:$F$100)-ROW(Sheet4!$F$2:$F$100)+1), 1))

where I use $B$4 as a reference cell for the status (Active, Inactive)
Sheet4 is the tab where I paste the raw data
The issue I run into is that it returns the first row, regardless of if it meets the criteria of the status being active. Hoping for assistance on where I am going wrong with my formula. Hope this is clear:
Raw Data Sample
BB01DE9E-1654-4ED4-8ED3-DF35F5147818_4_5005_c.jpeg


Summary page with the above formula (as you can see it returns the first row despite the status not matching, and as I drag down the formula, it returns the same value:
A1B6D501-103D-4998-A17E-3685EE386AF2_4_5005_c.jpeg
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Here's your issue:

=INDEX(Sheet4!$B$2:$B$100, SMALL(IF(Sheet4!$F$2:$F$100=$B$4, ROW(Sheet4!$F$2:$F$100)-ROW(Sheet4!$F$2:$F$100)+1), 1))

should be:

=INDEX(Sheet4!$B$2:$B$100, SMALL(IF(Sheet4!$F$2:$F$100=$B$4, ROW(Sheet4!$F$2:$F$100)-ROW(Sheet4!$F$2)+1), ROWS(C$6:C6))

Also, please update your profile with the version of Excel you're using. This would be much easier with the FILTER function available in newer versions.
 
Upvote 0
Try. ARRAY formula in B6 copied to full range.
Excel Formula:
=IFERROR(INDEX(Sheet4!B$2:B$100, SMALL(IF(Sheet4!$F$2:$F$100=$B$4, ROW(Sheet4!$F$2:$F$100),""), ROWS($B$6:$B6))-ROW($F$1)),"")
Normal formula in B6 copied to full range.
Excel Formula:
=IFERROR(INDEX(Sheet4!B$2:B$100, AGGREGATE(15,6, ROW(Sheet4!$F$2:$F$100)/(Sheet4!$F$2:$F$100=$B$4),ROWS($B$6:$B6))-ROW($F$1)),"")
NOTE:
To enter ARRAY formula
Copy and paste the formula in cell
Press F2
Press Ctrl+Shift+Enter together
Excel covers the formula with {}.
 
Upvote 0
Here's your issue:

=INDEX(Sheet4!$B$2:$B$100, SMALL(IF(Sheet4!$F$2:$F$100=$B$4, ROW(Sheet4!$F$2:$F$100)-ROW(Sheet4!$F$2:$F$100)+1), 1))

should be:

=INDEX(Sheet4!$B$2:$B$100, SMALL(IF(Sheet4!$F$2:$F$100=$B$4, ROW(Sheet4!$F$2:$F$100)-ROW(Sheet4!$F$2)+1), ROWS(C$6:C6))

Also, please update your profile with the version of Excel you're using. This would be much easier with the FILTER function available in newer versions.
This worked perfectly. Thank you.
 
Upvote 0
Try. ARRAY formula in B6 copied to full range.
Excel Formula:
=IFERROR(INDEX(Sheet4!B$2:B$100, SMALL(IF(Sheet4!$F$2:$F$100=$B$4, ROW(Sheet4!$F$2:$F$100),""), ROWS($B$6:$B6))-ROW($F$1)),"")
Normal formula in B6 copied to full range.
Excel Formula:
=IFERROR(INDEX(Sheet4!B$2:B$100, AGGREGATE(15,6, ROW(Sheet4!$F$2:$F$100)/(Sheet4!$F$2:$F$100=$B$4),ROWS($B$6:$B6))-ROW($F$1)),"")
NOTE:
To enter ARRAY formula
Copy and paste the formula in cell
Press F2
Press Ctrl+Shift+Enter together
Excel covers the formula with {}.
This also worked. Opted to go without the array, but good to know this works too. Thank you!
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,958
Members
449,096
Latest member
Anshu121

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top