Array formula based on 2 criterias

forest1959

New Member
Joined
Mar 16, 2010
Messages
30
Office Version
  1. 2016
Platform
  1. Windows
Hi All

I know this will be pretty straight forward, but i'm struggling to ask the web the right question..

I have an array formula that brings back an "order number" in column E, based on the order date in column A

{=IF(ROWS(A$35:A35)>COUNTIF(Timesheets!$A2:$A2000,$E$31),"",INDEX(Timesheets!$E2:$E2000,SMALL(IF(Timesheets!$A2:$A2000=$E$31,ROW(Timesheets!$A2:$A2000)-ROW(Timesheets!$A$2)+1),ROWS(A$35:A35))))}

I just need to add another criteria based on the employee's name populated in column C

Below is an example of the results i'm looking for

[TABLE="width: 427"]
<colgroup><col><col span="2"><col><col span="2"></colgroup><tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Criteria 1[/TD]
[TD]Criteria 2[/TD]
[TD]Results[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]05/04/2019[/TD]
[TD]Brian[/TD]
[TD]3456[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]5678[/TD]
[/TR]
[TR]
[TD]31/03/2019[/TD]
[TD]Brian[/TD]
[TD]1234[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]31/03/2019[/TD]
[TD]Chris[/TD]
[TD]2345[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]05/04/2019[/TD]
[TD]Brian[/TD]
[TD]3456[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]05/04/2019[/TD]
[TD]Chris[/TD]
[TD]4567[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]05/04/2019[/TD]
[TD]Brian[/TD]
[TD]5678[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]05/04/2019[/TD]
[TD]Chris[/TD]
[TD]6789[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]

regards
Paul
 
Got it.. Thank you so much

Your final attempt, (and maybe even the one before worked), it was just missing the $ from the column numbers which i missed out on my original example..

Thank you once again, and apologies for my glaring error

regards
Paul
 
Upvote 0

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Is it just the absolute reference which was messing it up ...

Code:
[COLOR=#333333][I]=IF(ROWS(A$35:A35)>COUNTIF(Timesheets!$A2:$A2000,$E$31),"",INDEX(Timesheets!$E2:$E2000,SMALL(IF(Timesheets!$C2:$C2000=$F$31,IF(Timesheets!$A2:$A2000=$E$31,ROW(Timesheets!$A2:$A2000)-ROW(Timesheets!$A$2)+1)),ROWS(A$35:A35))))[/I][/COLOR]

Let's hope ...:smile:
 
Upvote 0
Is it just the absolute reference which was messing it up ...

Code:
[COLOR=#333333][I]=IF(ROWS(A$35:A35)>COUNTIF(Timesheets!$A2:$A2000,$E$31),"",INDEX(Timesheets!$E2:$E2000,SMALL(IF(Timesheets!$C2:$C2000=$F$31,IF(Timesheets!$A2:$A2000=$E$31,ROW(Timesheets!$A2:$A2000)-ROW(Timesheets!$A$2)+1)),ROWS(A$35:A35))))[/I][/COLOR]

Let's hope ...:smile:

Yes it was.. Apologies once again..

Thank you for your time
 
Upvote 0

Forum statistics

Threads
1,225,759
Messages
6,186,864
Members
453,380
Latest member
ShaeJ73

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