Dec 29 2020 06:50 AM
Using below formula to count the leaves between the dates. But i do not know what is wrong with my formula that why its not making calculations whereas it is accurate.
and i am also looking to shorten this formula.
anybody please help.
Dec 29 2020 08:08 AM
@TheOcean Oh my! What a formula. I don't even dare to start analysing it. Rather than revising the formula, I would like to suggest that you change the way you capture leave data. Use one table and then create whatever summary report you want/need from it. Sheet2 in the attached (your) sheet is just an example of what is possible, using a pivot table.
Dec 29 2020 08:11 AM - edited Dec 29 2020 08:13 AM
That may be the longest formula I've ever seen.
There is a reason (actually there are more than one reason) why many textbooks on Excel recommend strongly against writing formulas that are long. You're in the midst of learning some of them. Primary reason, though, is this: It's extremely difficult to diagnose the cause when a formula stops working (or never really works in the first place). This is especially true if somebody else wrote the formula.
Is such an approach--a radical redesign--thinkable? If so, you'll need to provide a deeper description of what the overall process is intended to achieve. Are you also tracking other aspects of employee history, for example? What is the bigger picture?
If you're not open to a redesign, then use "helper columns" and break the formula you have into sub-formulas. You clearly know how to write working formulas; you've just made the mistake of trying to pack all of the conditions into a single formula and are now experiencing the inevitable result--unintelligibility.