Home > Software engineering >  Need Formula Help For Multiple Dependent Date Cells in Excel
Need Formula Help For Multiple Dependent Date Cells in Excel

Time:12-06

I am trying to calculate the "Time in Stage" (TIS) for our recruiting team for each stage of the process but each cell is dependent on another cell. For example, let's say the process is entered into cells in order, it would look like this: A1="Date: Review Stage", B1="Date: Screen Stage", C1="Date: Assessment Stage", D1="Date: Interview Stage", E1="Date: Offer Stage", and F1="Date: Hire Stage". I am trying to calculate how long a candidate stays in each stage before advancing to the next stage. For example, If the candidate was added on January 1 and they were screened on January 5th, their time in the "Review" stage was 4 days. Technically, if the candidate is in the "Interview Stage", the "Review" and "Screen" stages should have dates.

Here's the problem, not all cells have a date even though the candidate went through that stage. Is there a way to calculate Time in Stage if one or more cells are blank? I tried adding a TODAY column to run a nested IF statement that essentially says IF any cell (B1, C1, D1, or E1) is blank, then the TIS for cell A1 would be TODAY-Added Date (even though that's not accurate it still gives me an idea that someone has been in the process far too long and I can speak with the manager for that recruiter).

I have the following formula: =IF([@[Date: Assessment Stage]]="",TODAY()-[@[Date: Screen Stage]],[@[Date: Assessment Stage]]-[@[Date: Screen Stage]]). This would work if there is a date in the "Date: Screen Stage" cell. The problem is that many of our recruiters don't complete each stage (i.e., they go from review directly to hire) which leaves multiple dates blank so it returns "44896" so I can't determine what the time in stage is because it depends on another cell having a date. Some have a date in one or two cells but not all, some have no dates except the date the candidate was added and their hire date.

CodePudding user response:

Here's where I ended up. I placed this formula somewhere, in my case I used I2:

=IF(A2>0,MIN(B2:$F2,TODAY())-A2,"")

And then copied it right, and then down.

In cell I2 the formula is as above. But copied right, the columns are going to increment one to the right each time:

Rvw Days Screen Days Assess Days Intrvw Days Offer Days
=IF(A2>0,MIN(B2:$F2,TODAY())-A2,"") =IF(B2>0,MIN(C2:$F2,TODAY())-B2,"") =IF(C2>0,MIN(D2:$F2,TODAY())-C2,"") =IF(D2>0,MIN(E2:$F2,TODAY())-D2,"") =IF(E2>0,MIN(E2:$F2,TODAY())-E2,"")

What this says is "if phaseStartDate > 0, then phaseLength = whatever the next phase start to the right is, or if all to the right is blank, use today's date."

  • Related