Flagging the latest final transaction as LIVE if it appears in a range more than once...

HOGGL

New Member
Joined
Nov 2, 2017
Messages
7
Hi,

I feel like this should be really easy with an if statement and a concatenate but the max on the date is throwing me off.

I'm looking to add a formula to column F that determines the line is "LIVE" or "INACTIVE"

So If "Customer & Code & Product & Status" appear in the list of data more than once then flag the most recent (using the Date column D) as "LIVE" and the others as "INACTIVE".

Thanks in advance :)

ABCDEF
1CUSTOMERCODEPRODUCTDATESTATUSLIVE
2CBOO6007200160423/04/2017FINAL
3CBOO6007200160401/05/2017FINAL
4CBOO6007200160423/05/2017PROVISIONAL
5CBOO6007300160425/01/2017FINAL
6CBAR1007200150101/09/2017PROVISIONAL
7CBAR1007200160423/05/2017FINAL

<tbody>
</tbody>
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
I have a few options for you:

ABCDEFGH
1CUSTOMERCODEPRODUCTDATESTATUSLIVE
2CBOO6007200160423-AprFINALInactiveInactiveInactive
3CBOO600720016045/1/2017FINALInactiveInactiveInactive
4CBOO6007200160423-MayPROVISIONALLiveLiveLive
5CBOO6007300160425-JanFINALLiveLiveLive
6CBAR100720015019/1/2017PROVISIONALLiveLiveLive
7CBAR1007200160423-MayFINALLiveLiveLive

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet7

Worksheet Formulas
CellFormula
F2=IF(D2=MAXIFS(D:D,A:A,A2,B:B,B2,C:C,C2),"Live","Inactive")
H2=IF(COUNTIFS(A:A,A2,B:B,B2,C:C,C2)=COUNTIFS($A$2:$A2,A2,$B$2:$B2,B2,$C$2:$C2,C2),"Live","Inactive")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

Array Formulas
CellFormula
G2{=IF(D2=MAX(IF($A$2:$A$10=A2,IF($B$2:$B$10=B2,IF($C$2:$C$10=C2,$D$2:$D$10)))),"Live","Inactive")}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>



If you have Excel 2016 or newer with the MAXIFS function, the F2 formula should work for you.

If you don't have MAXIFS, the G2 array formula is equivalent.

If you don't like array formulas, and the dates are entered in order, then the H2 formula should work. It just basically marks the lowest combination of Customer/Code/Product as Live, and everything above it as Inactive.
 
Upvote 0

Forum statistics

Threads
1,215,372
Messages
6,124,537
Members
449,169
Latest member
mm424

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