Or if you do already have something in place but are struggling with creating the requisite formulae post up a sample of your file which includes some dummy shift data and outline desired results.