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

Criteria 1Criteria 2Results
05/04/2019Brian3456
5678
31/03/2019Brian1234
31/03/2019Chris2345
05/04/2019Brian3456
05/04/2019Chris4567
05/04/2019Brian5678
05/04/2019Chris6789

<colgroup><col><col span="2"><col><col span="2"></colgroup><tbody>
</tbody>

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

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
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 ...:)
 
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 ...:)

Yes it was.. Apologies once again..

Thank you for your time
 
Upvote 0
You are welcome ...

Glad it is all sorted out ... :)
 
Upvote 0

Forum statistics

Threads
1,213,551
Messages
6,114,272
Members
448,558
Latest member
aivin

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