INDEX Functions with multiple criteria

gibson8

New Member
Joined
Jan 25, 2024
Messages
11
Office Version
  1. 365
Platform
  1. Windows
I am trying to use the INDEX functions to extract multiple data with multiple criteria from different work sheet.

But it didn't work, it show empty cells, no error was given about the formula.

Please kindly advise and see the formula and table below.


A columnB ColumnC ColumnD ColumnE Column
6w46wr12023John SDecember555
646313212023Smith NDecember666
275372022Nana SanOctober777
7378372023John SDecember6565
4378782023Nana SanDecember888
dsfsg12022Nana SanDecember999
kku1232023Smith NJuly111
rtete12332024Smith NDecember222

Smith N , 2023, December
=IFERROR(INDEX($A$2:$A$17,SMALL(IF(($C$2:$C$17=Smith N)*($B$2:$B$17=2023)*($D$2:$D$17=December), ROW($A$2:$A$17)),ROW(1:1))-1,1),"")

Since the table is in another sheet with same workbook.
but I tried the formula above, the cells still give me empty data.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
=IFERROR(INDEX($A$2:A$100,AGGREGATE(15,6,ROW($A$2:$A$100)/(($C$2:$C$100="SMITH N")*($B$2:$B$100=2023)*($D$2:$D$100="December")),ROWS($A$2:A2))-(2-1),COLUMNS($A2:A2)),"")
 
Upvote 0
If you don't need it to be backward compatible and can just use 365 functions this should work:
Excel Formula:
=FILTER($A$2:$E$17,($C$2:$C$17="Smith N")*($B$2:$B$17=2023)*($D$2:$D$17="December"),"")

PS: change the E to A if you only want the value in column A returned.
 
Upvote 0
=IFERROR(INDEX($A$2:A$100,AGGREGATE(15,6,ROW($A$2:$A$100)/(($C$2:$C$100="SMITH N")*($B$2:$B$100=2023)*($D$2:$D$100="December")),ROWS($A$2:A2))-(2-1),COLUMNS($A2:A2)),"")
thank you @Special-K99, at last i figured out that the issue is different format of the cells from the original data.
and it also happens on your formula, if the data is in different format (some are in General format, some Text format, some Number format), show data won't show up in the index formula.
 
Upvote 0
If you don't need it to be backward compatible and can just use 365 functions this should work:
Excel Formula:
=FILTER($A$2:$E$17,($C$2:$C$17="Smith N")*($B$2:$B$17=2023)*($B$2:$B$17=2023)*($D$2:$D$17="December"),"")

PS: change the E to A if you only want the value in column A returned.
thank you @Alex Blakenburg, what if i want to sort out similar data but not only December, and also October. it didn't work even i added *($B$2:$B$17=2023)*($D$2:$D$17="October") after December one.
 
Upvote 0
=FILTER($A$2:$E$17,($C$2:$C$17="Smith N")*($B$2:$B$17=2023)*(($D$2:$D$17="December")+($D$2:$D$17="October")),"")
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,116
Members
453,021
Latest member
Justyna P

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