Formula: Indicate instances where a particular transaction type occurs after a different transaction type

kreestar

New Member
Joined
Apr 6, 2004
Messages
32
Hello,

Been scratching my head with this one this morning and hope - true to form - you have the answer.

Dummy data (sorted by Purchase Date/Time):


Excel 2007
ABCDEFG
1Customer NameFirst NameLast NamePurchase DateAmountItemTYPE
2Customer FRogerJones5/30/2012 16:5811BBBBCash Purchase
3Customer FRogerJones6/2/2012 21:0311BBBBCash Purchase
4Customer FRogerJones6/3/2012 17:1310CCCCCash Purchase
5Customer FRogerJones6/4/2012 18:1710DDDDCash Purchase
6Customer FRogerJones6/5/2012 19:1811EEEECash Purchase
7Customer FRogerJones6/6/2012 19:0110BBBBCash Purchase
8Customer FRogerJones6/6/2012 22:10355BBBBVoucher Purchase
9Customer ABobSmith6/1/2012 22:5420AAAAVoucher Purchase
10Customer ABobSmith6/1/2012 22:5630BBBBCash Purchase
11Customer CJohnWilliams5/31/2012 9:0830EEEECash Purchase
12Customer CJohnWilliams6/2/2012 15:57400DDDDVoucher Purchase
13Customer CJohnWilliams6/5/2012 3:4630EEEECash Purchase
14Customer CJohnWilliams6/4/2012 22:3350DDDDVoucher Purchase
15Customer CJohnWilliams6/5/2012 22:18800DDDDVoucher Purchase
16Customer DLilyEdwards6/5/2012 3:4630DDDDCash Purchase
17Customer DLilyEdwards6/6/2012 1:41500BBBBVoucher Purchase
18Customer DLilyEdwards6/7/2012 7:06100BBBBCash Purchase
19Customer DLilyEdwards6/7/2012 8:05100EEEECash Purchase
20Customer GCathyBrown6/5/2012 11:0420BBBBCash Purchase
Sheet1


We're needing to isolate purchases that occur after a voucher has been used. We'll add "Transaction" column ("Before Voucher"/"After Voucher"/"Voucher") and delete the "Before Voucher" items.

In the data above, Row 10 and Rows 18-19 are Transactions that happened after a Voucher Purchase. Rows 2-7 are not.

For customer Lily Edwards, we're not interested in seeing Row 16 (before Voucher Purchase), but do care about Row 18 and 19 (and 17 because it has the voucher purchase). We're not interested in seeing customers where there are no Voucher Purchases (e.g. Cathy Brown).

If there are multiple Voucher Purchases (like John Williams), we're interested in all Transaction occurring after a Voucher has been purchased, so we'd not care for Row 11, but we do for Rows 12-15 (Purchases after the first Voucher purchase, including the Voucher purchases themselves).

All my (feeble) attempts have ended in frustration, so hoping you guys can help!

Thanks,

Kree
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,213,551
Messages
6,114,268
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