Status Report - Return incomplete Predecessors.

Excel_Blonde

New Member
Joined
Aug 8, 2018
Messages
44
Hi there,

I have my IT guru trying to create a report that will tell me if previous operations within a work structure have not been completed (Either Inventory or Pending status). I was wondering if any of you great people can help. For example from the data in the table below I would B/75 and B/76 to be returned. I believe they attempting this using SQL but are trying to get the formula correct in excel first but is just falling short. Any help would be greatly appreciated.

[TABLE="width: 500"]
<tbody>[TR]
[TD]Job No[/TD]
[TD]Op No[/TD]
[TD]Predecessor[/TD]
[TD]Status[/TD]
[/TR]
[TR]
[TD]B/75[/TD]
[TD]10[/TD]
[TD][/TD]
[TD]Inventory[/TD]
[/TR]
[TR]
[TD]B/75[/TD]
[TD]20[/TD]
[TD]10[/TD]
[TD]Pending[/TD]
[/TR]
[TR]
[TD]B/75[/TD]
[TD]30[/TD]
[TD]20[/TD]
[TD]Complete[/TD]
[/TR]
[TR]
[TD]B/76[/TD]
[TD]10[/TD]
[TD][/TD]
[TD]Complete[/TD]
[/TR]
[TR]
[TD]B/76[/TD]
[TD]20[/TD]
[TD]10[/TD]
[TD]Inventory[/TD]
[/TR]
[TR]
[TD]B/76[/TD]
[TD]30[/TD]
[TD]20[/TD]
[TD]Pending[/TD]
[/TR]
[TR]
[TD]B/76[/TD]
[TD]40[/TD]
[TD]30[/TD]
[TD]Complete[/TD]
[/TR]
[TR]
[TD]B/76[/TD]
[TD]50[/TD]
[TD]40[/TD]
[TD]Pending[/TD]
[/TR]
[TR]
[TD]B/77[/TD]
[TD]10[/TD]
[TD][/TD]
[TD]Complete[/TD]
[/TR]
[TR]
[TD]B/77[/TD]
[TD]20[/TD]
[TD]10[/TD]
[TD]Complete[/TD]
[/TR]
[TR]
[TD]B/77[/TD]
[TD]30[/TD]
[TD]20[/TD]
[TD]Pending[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Can you tell us in words the rule/s that get B/75 and B/76 returned based on that table?
 
Upvote 0
Can you tell us in words the rule/s that get B/75 and B/76 returned based on that table?

Hi Steve,

Thanks for your reply. We want to look at the Job No and the latest completed operation and return the Job No if any of the predecessors have a status of Inventory or Pending. I hope this answers your question.
 
Upvote 0
I cant see any way to do that in one formula. Maybe someone else can but i cant. I can sort of help by using a helper formula:

In G2:

=IFERROR(INDEX($A$2:$A$12, MATCH(0,COUNTIF($G$1:G1, $A$2:$A$12), 0)),"")

Enter CTRL-SHIFT-ENTER and drag down until no new values appear.

In H2:

=IF(G2<>"",IF(SUM(COUNTIFS($A$2:$A$12,G2,$B$2:$B$12,"<>"&MAXIFS($B$2:$B$12,$A$2:$A$12,G2),$D$2:$D$12,{"Inventory","Pending"})),"Yes","No"),"")

This would then produce:

[TABLE="width: 195"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]B/75[/TD]
[TD]Yes[/TD]
[/TR]
[TR]
[TD]B/76[/TD]
[TD]Yes[/TD]
[/TR]
[TR]
[TD]B/77[/TD]
[TD]No
[/TD]
[/TR]
</tbody>[/TABLE]

Im not sure if that is helpful or not.
 
Upvote 0
I cant see any way to do that in one formula. Maybe someone else can but i cant. I can sort of help by using a helper formula:

In G2:

=IFERROR(INDEX($A$2:$A$12, MATCH(0,COUNTIF($G$1:G1, $A$2:$A$12), 0)),"")

Enter CTRL-SHIFT-ENTER and drag down until no new values appear.

In H2:

=IF(G2<>"",IF(SUM(COUNTIFS($A$2:$A$12,G2,$B$2:$B$12,"<>"&MAXIFS($B$2:$B$12,$A$2:$A$12,G2),$D$2:$D$12,{"Inventory","Pending"})),"Yes","No"),"")

This would then produce:

[TABLE="width: 195"]
<tbody>[TR]
[TD]B/75[/TD]
[TD]Yes[/TD]
[/TR]
[TR]
[TD]B/76[/TD]
[TD]Yes[/TD]
[/TR]
[TR]
[TD]B/77[/TD]
[TD]No[/TD]
[/TR]
</tbody>[/TABLE]

Im not sure if that is helpful or not.


Thank you. I'll pass it over and see how we get on. :)
 
Upvote 0
Thank you. I'll pass it over and see how we get on. :)

No unfortunately this isn't quite what I'm looking for. Thank you very much for trying though.

This only looks at anything Inventory or Pending but these in most cases will be correct. Its only where complete appears after the inventory or pending that I want it to be highlighted.
I will keep going and update if I ever come up with a solution :laugh::confused:
 
Upvote 0
No unfortunately this isn't quite what I'm looking for. Thank you very much for trying though.

This only looks at anything Inventory or Pending but these in most cases will be correct. Its only where complete appears after the inventory or pending that I want it to be highlighted.
I will keep going and update if I ever come up with a solution :laugh::confused:

I'm still struggling with this one. I've tried all sorts but not getting anywhere. Can anyone help??
 
Upvote 0
How about


Excel 2013/2016
ABCDE
1Job NoOp NoPredecessorStatus
2B/7510InventoryWrong
3B/752010PendingWrong
4B/753020Complete
5B/7610CompleteWrong
6B/762010InventoryWrong
7B/763020PendingWrong
8B/764030CompleteOk
9B/765040Pending
10B/7710CompleteOk
11B/772010CompleteOk
12B/773020Pending
Proposal
Cell Formulas
RangeFormula
E2=IF(A3=A2,IF(AND(D3="Complete",D2<>"Complete"),"Wrong",IF(E3="Wrong","Wrong","Ok")),"")
 
Upvote 0
How about

Excel 2013/2016
ABCDE
Job NoOp NoPredecessorStatus
B/75InventoryWrong
B/75PendingWrong
B/75Complete
B/76CompleteWrong
B/76InventoryWrong
B/76PendingWrong
B/76CompleteOk
B/76Pending
B/77CompleteOk
B/77CompleteOk
B/77Pending

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: right"][/TD]

[TD="align: center"]2[/TD]

[TD="align: right"]10[/TD]
[TD="align: right"][/TD]

[TD="align: center"]3[/TD]

[TD="align: right"]20[/TD]
[TD="align: right"]10[/TD]

[TD="align: center"]4[/TD]

[TD="align: right"]30[/TD]
[TD="align: right"]20[/TD]

[TD="align: center"]5[/TD]

[TD="align: right"]10[/TD]
[TD="align: right"][/TD]

[TD="align: center"]6[/TD]

[TD="align: right"]20[/TD]
[TD="align: right"]10[/TD]

[TD="align: center"]7[/TD]

[TD="align: right"]30[/TD]
[TD="align: right"]20[/TD]

[TD="align: center"]8[/TD]

[TD="align: right"]40[/TD]
[TD="align: right"]30[/TD]

[TD="align: center"]9[/TD]

[TD="align: right"]50[/TD]
[TD="align: right"]40[/TD]

[TD="align: center"]10[/TD]

[TD="align: right"]10[/TD]
[TD="align: right"][/TD]

[TD="align: center"]11[/TD]

[TD="align: right"]20[/TD]
[TD="align: right"]10[/TD]

[TD="align: center"]12[/TD]

[TD="align: right"]30[/TD]
[TD="align: right"]20[/TD]

</tbody>
Proposal

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]E2[/TH]
[TD="align: left"]=IF(A3=A2,IF(AND(D3="Complete",D2<>"Complete"),"Wrong",IF(E3="Wrong","Wrong","Ok")),"")[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]


Thank you for your suggestion. But this doesn't quite work. Row 2 and 3 should be ok and row 4 should be wrong. Row 5,6 & 7 should ok but row 8 should be wrong. Rows 10 and 11 are correct.

I have found a work around though:

In Column E - =IF(AND(D2="Complete",OR(D1="Iventory",D1="Pending")),"Yes","No")
In Column F - =IF(B2<B1,"No",E2)

I should then be able to pull the job number from the Yes results in Column E. I'm just waiting for someone to double check this for me.

Thank you for your responses. :)
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,306
Members
452,633
Latest member
DougMo

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