• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

IF using multiple columns and date ranges to calculate Turnover

Hello,

There is nothing like another challenge before Christmas....

I would love some assistance to create a formula using columns A & B to identify who the turnover is for & what the turnover is.

The calculation then is the Sum of Terminations (Last 12 months) / the Average Headcount (Last 12 months).

The outcome should be as per O17:Z22, highlighted green - I know the formula I have used works, but it isn't robust and if one tab changes the sort for example, this will not be fit for purpose.

If you need anymore information, please don't hesitate to reach out to me.

thank you, and stay safe over the holidays!!

Kelli
 

Attachments

  • Chandoo Turnover using multiple columns.xlsx
    23.9 KB · Views: 11
The attached is based upon a Dynamic Array formula but it makes something of a meal of the problem.
Code:
= LET(
  YearStart, EDATE(+Period, -12),
  TerminationRow, XLOOKUP(@Office&@Department, Office&Department, Terminations),
  HeadcountRow,   XLOOKUP(@Office&@Department, Office&Department, HC),
  YrTermination, SUMIFS( TerminationRow, Period, ">"&YearStart, Period, "<="&Period ),
  AvHeadcount, AVERAGEIFS(HeadcountRow, Period, ">"&YearStart, Period, "<="&Period),
  YrTermination / AvHeadcount )
 

Attachments

  • Chandoo Turnover using multiple columns.xlsx
    28.6 KB · Views: 11
The attached is based upon a Dynamic Array formula but it makes something of a meal of the problem.
Code:
= LET(
  YearStart, EDATE(+Period, -12),
  TerminationRow, XLOOKUP(@Office&@Department, Office&Department, Terminations),
  HeadcountRow,   XLOOKUP(@Office&@Department, Office&Department, HC),
  YrTermination, SUMIFS( TerminationRow, Period, ">"&YearStart, Period, "<="&Period ),
  AvHeadcount, AVERAGEIFS(HeadcountRow, Period, ">"&YearStart, Period, "<="&Period),
  YrTermination / AvHeadcount )
Thank you Peter, this is Perfect!
I wish you a very Safe & Happy Holidays!!

take care, Kelli
 
The department names in cells B6:B7 are different from those in cells B13:B14; is this correct?
 
I don't recommend the attached as a solution, it was more of a Power Query exercise for me.
2 Named ranges added HeadCount and Terminations.
Update them with new data (resize if necessary), make sure the Department and Office columns match, then refresh the table at the bottom (Results).
This was more convoluted than I thought it would be because I wanted to retain the real dates information in your tables' headers.
 

Attachments

  • Chandoo45451 Turnover using multiple columns.xlsx
    38.3 KB · Views: 5
Back
Top