index match array formula based on two criteria and from earliest to latest date

mychi11

Board Regular
Joined
May 11, 2020
Messages
95
Office Version
  1. 2016
Platform
  1. Windows
artrecordsheet210520202.xlsm
CDEFGHNWAEAF
1CY NO (1)CY NO (2)CY NO (3) CRYO DATE WIFE NAMEART NO. AVAILABLE EMBAVAILABLE OCSTRAW BALANCE LOCATION
2         A-1C-1
368 28-05-20BETTY200522-01 186A-1C-2
4         A-1C-3
52  21-05-20ALICE200514-022 1A-1C-4
61  27-05-20AMY200514-01  11A-1C-5
7         A-1C-6
834518-05-20ACE200515-012 1A-1C-7
9         A-1C-8
10         A-1C-9
1168 04-12-21BETTY200522-012 1A-1C-10
12         A-1C-11
131  27-05-20AMY200514-01   A-1C-12
STORAGE TANK


I am wondering if anyone could suggest me a formula for column C for the column to match both the cryo date and wife name in another sheet with the CY no (from the earliest date to later date) for Cy no (1,2,3)
I tried the following formula :
=IFERROR(INDEX(tableart[CY NO. ],AGGREGATE(15,6,(ROW(tableart[WIFE NAME])-ROW(ART!$O$2)+1)/(tableart[WIFE NAME]=$G3)*(ROW(tableart[CRYO DATE])-ROW(ART!$CK$2)+1)/(tableart[CRYO DATE]=$F3),COLUMNS($C3:C3))),"")
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
If you're dragging right then you need to enter the table column names twice to make them absolute.

You had a lot in the formula that you didn't need as well, so I've taken that out. Hopefully I have the syntax right.

=IFERROR(INDEX(tableart[[CY NO. ]:[CY NO. ]],AGGREGATE(15,6,ROW(tableart[[#Headers][WIFE NAME]:[WIFE NAME]])/(tableart[[WIFE NAME]:[WIFE NAME]]=$G3)/(tableart[[CRYO DATE]:[CRYO DATE]]=$F3),COLUMNS($C3:C3))),"")
 
Upvote 0
thank you so much for your ans. I have realised some problem with my logic previously as i might have multiple cryo dates in this case. so i might to the match another criteria instead. I tried to modify your formula according to my need but i was having some difficulties. I was wondering if you could help me for the following case?
artrecordsheet210520202.xlsm
CDEFGMVADAE
1CY NO (1)CY NO (2)CY NO (3) WIFE NAMEART NO. AVAILABLE EMBAVAILABLE OCSTRAW BALANCE LOCATION
2        A-1C-1
368 BETTY200522-01 186A-1C-2
4        A-1C-3
52  ALICE200514-022 1A-1C-4
61  AMY200514-01  11A-1C-5
7        A-1C-6
8345ACE200515-012 1A-1C-7
9        A-1C-8
10        A-1C-9
1168 BETTY200522-012 1A-1C-10
12        A-1C-11
131  AMY200514-01   A-1C-12
STORAGE TANK



I was having problem to show the cy no for betty and amy correctly. I will need them to match according to the location in this. I am wondering if anyone could suggest me a formula for column C to E in this case?
 
Upvote 0
I think this is what you're asking for. It would help if your examples contained the correct (expected) results instead of incorrect formulas.

=IFERROR(INDEX(tableart[[CY NO. ]:[CY NO. ]],AGGREGATE(15,6,ROW(tableart[[#Headers][WIFE NAME]:[WIFE NAME]])/(tableart[[WIFE NAME]:[WIFE NAME]]=$G3)/(tableart[[CRYO DATE]:[CRYO DATE]]=$F3)/(((tableart[[Location]:[Location]]=$AE3)+(tableart[[Location 2]:[Location 2]]=$AE3))>0),COLUMNS($C3:C3))),"")
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,259
Members
452,626
Latest member
huntinghunter

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