Lookup specific values that occur in sequence

estephenkim

New Member
Joined
Feb 6, 2016
Messages
27
Office Version
  1. 365
Platform
  1. Windows
In a data set, I'm trying to identify a way to lookup the first instance of a transaction type and its corresponding date and the first instance of a second transaction type (and corresponding date) that occurs after the first transaction type. In the enclosed example (click on image), in the yellow highlighted cells to the right, I'd like to apply a formula (or other method) to identify the first Initial transaction and date and first Pass (and date) that occurs after the first Initial (the required data are highlighted in green and orange). Any viable suggestions or ideas would be appreciated!
 

Attachments

  • Capture - Data lookup - 2023.09.26 (2).png
    Capture - Data lookup - 2023.09.26 (2).png
    29.8 KB · Views: 21

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
try this:

Mr Excel Akbarov.xlsx
ABCDEFGHIJKLM
1Transaction 1Transaction 1 daateTransaction 2Transaction 2 DateTransaction 3Transaction 3 dateTransaction 4Transaction 4 DateFirst InitialDate of First InitialFirst PassDate of First Pass
2Initial2021-09-15Verify2021-10-01Pass2022-11-11Transaction 12021-09-15Transaction 42022-11-11
3Initial2022-06-24Verify2022-08-28Fail2022-09-29--Transaction 12022-06-24  
4Initial2022-03-26Verify2022-06-01Pass2022-07-05--Transaction 12022-03-26Transaction 32022-07-05
5Initial2021-12-16Pass2022-01-05Initial2022-09-15Pass2022-09-20Transaction 12021-12-16Transaction 22022-01-05
6Verify2022-01-05Pass2022-03-16Initial2022-08-30Pass2022-08-31Transaction 32022-08-30Transaction 22022-03-16
estephenkim
Cell Formulas
RangeFormula
J2:J6J2=IFNA(INDEX($A$1:$H$1,MATCH("Initial",$A2:$H2,0)),"")
K2:K6K2=IFNA(INDEX($A2:$H2,MATCH("Initial",$A2:$H2,0)+1),"")
L2:L6L2=IFNA(INDEX($A$1:$H$1,MATCH("Pass",$A2:$H2,0)),"")
M2:M6M2=IFNA(INDEX($A2:$H2,MATCH("Pass",$A2:$H2,0)+1),"")
 
Upvote 0
Thanks for your efforts, awoohaw! I think you're taking the right approach with this formula. I just need to add an additional element to select the first instance of a Pass that occurs after the Initial.

For example, in row 6, the formula as it is currently written returns the first Pass in that row, dated 2022-03-16 (Cells C6:D6). The correct Pass I need in row 6 is the one that follows the Initial, located in Cells G6:H6. Said differently, I need the first Pass transaction that occurs after the Initial transaction in each row.

Is there a way to modify the formula for the Pass transaction to anchor it to the Initial transaction in a given row? I wonder if a combination of INDEX and XLOOKUP might work?
 
Upvote 0

Forum statistics

Threads
1,223,768
Messages
6,174,414
Members
452,562
Latest member
Himeshwari

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