Maverick_NL

New Member
Joined
Sep 7, 2022
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hi,
I'm trying to make an overview of all projects that have been started and in what status they are in. To make a management summary I want to log how long (days) the status "open" or the status "Hold" is activated for the project.
But when the X shift between the columns the last status is not retained. When the status changes back it starts counting again from start till today "=IF(D3="X";TODAY()-C3;NA())"
Is there a way to count the days that the project has a status even when it switches between open and hold?
Thanks in advance!
Example.xlsx
BCDEFGHIJK
1Project PlaceStatus
2Date StartOpenHoldDate completedDate StoppedOpenHoldCompletedStoppped
3Productivity & Sustainability10-1-2022X24-2-2022246#N/A45#N/A
4Research & Scientific17-1-2022X24-1-2022239#N/A#N/A239
5Technology Platform7-2-2022X218#N/A#N/A#N/A
6Technology Platform14-2-2022X211#N/A#N/A#N/A
7New Product Development28-2-2022x197#N/A#N/A#N/A
8New Product Development4-3-2022Xx193193#N/A#N/A
9Research & Scientific18-4-2023X#N/A-217#N/A#N/A
10Productivity & Sustainability15-5-2022X#N/A121#N/A#N/A
Sheet1
Cell Formulas
RangeFormula
H3:H10H3=IF(D3="X",TODAY()-C3,NA())
I3:I10I3=IF(E3="X",TODAY()-C3,NA())
J3J3=IF(ISBLANK(F3),NA(),F3-C3)
K3:K10K3=IF(ISBLANK(G3),NA(),TODAY()-C3)
J4:J10J4=IF(ISBLANK(F4),NA(),TODAY()-C4)
C4,C6C4=C3+7
C5C5=C4+21
C7C7=C6+14
Cells with Conditional Formatting
CellConditionCell FormatStop If True
H1:XFD1,3:1048576,C2:XFD2,A1:C1Cellcontains an errortextNO
Cells with Data Validation
CellAllowCriteria
B3:B10List=Labels!$A$1:$A$4
D3:E10List=Labels!$A$7
 

Attachments

  • 1663074825421.png
    1663074825421.png
    26.5 KB · Views: 6

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
I'd do something different - Keep the data separate, so all the records are there, and just rebuild the report with formulas.

MrExcelPlayground11.xlsx
ABCDEFGHIJKLMN
1ProjectActionDateProjectStart DateOpenHoldDate CompletedDate StoppedOpen daysHold daysCompleted daysStopped days
2AStart1/1/2022A1/1/2022X   21244  
3BStart2/1/2022B2/1/2022  7/15/2022 164061 
4CStart4/2/2022C4/2/2022  9/13/2022 124401 
5AHold5/16/2022D8/16/2022 X 8/26/2022524 19
6AResume6/2/2022
7BFinish7/15/2022
8CHold8/1/2022
9AHold8/15/2022
10DStart8/16/2022
11DHold8/18/2022
12DResume8/21/2022
13DHold8/22/2022
14DResume8/24/2022
15DHold8/26/2022
16CResume9/10/2022
17AResume9/11/2022
18CFinish9/13/2022
Sheet27
Cell Formulas
RangeFormula
E2:E5E2=UNIQUE(A2:A18)
F2:F5F2=XLOOKUP(E2#&"Start",A2:A18&B2:B18,C2:C18,"",0)
G2:G5G2=IF(OR(INDEX(SORT(FILTER($A$2:$C$18,$A$2:$A$18=E2),3,-1),1,2)="Start",INDEX(SORT(FILTER($A$2:$C$18,$A$2:$A$18=E2),3,-1),1,2)="Resume"),"X","")
H2:H5H2=IF(INDEX(SORT(FILTER($A$2:$C$18,$A$2:$A$18=E2),3,-1),1,2)="Hold","X","")
I2:I5I2=IFERROR(FILTER($C$2:$C$18,($A$2:$A$18=E2)*($B$2:$B$18="Finish")),"")
J2:J5J2=IF(H2="X",IFERROR(INDEX(SORT(FILTER($C$2:$C$18,($A$2:$A$18=E2)*($B$2:$B$18="Hold")),1,-1),1,1),""),"")
K2:K5K2=LET(z,FILTER($B$2:$C$18,$A$2:$A$18=E2), a,SORT(z,2), b,INDEX(a,SEQUENCE(ROWS(a)),2), c,INDEX(SORT(z,2),1,2), d,INDEX(b,SEQUENCE(ROWS(b)-1,1,2,1),1)-INDEX(b,SEQUENCE(ROWS(b)-1,1,1,1),1), e,SUM(INDEX(d,SEQUENCE((ROWS(d)+1)/2,1,1,2))), FF,IF(G2="X",e+TODAY()-MAX(b),e), g,SUM(INDEX(d,SEQUENCE(ROWS(d)/2,1,2,2))), HH,IF(H2="X",g+TODAY()-MAX(b),g), FF)
L2:L5L2=LET(z,FILTER($B$2:$C$18,$A$2:$A$18=E2), a,SORT(z,2), b,INDEX(a,SEQUENCE(ROWS(a)),2), c,INDEX(SORT(z,2),1,2), d,INDEX(b,SEQUENCE(ROWS(b)-1,1,2,1),1)-INDEX(b,SEQUENCE(ROWS(b)-1,1,1,1),1), e,SUM(INDEX(d,SEQUENCE((ROWS(d)+1)/2,1,1,2))), FF,IF(G2="X",e+TODAY()-MAX(b),e), g,SUM(INDEX(d,SEQUENCE(ROWS(d)/2,1,2,2))), HH,IF(H2="X",g+TODAY()-MAX(b),g), IFERROR(HH,0))
M2:N5M2=IF(I2<>"",TODAY()-I2,"")
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,214,908
Messages
6,122,187
Members
449,071
Latest member
cdnMech

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