Using below formula to count the leaves between the dates. That formula sometimes give result and sometime sheet keep gives an error of reloading the sheet.
I think this formula is much heavier to make calculation.
I have attached an sheet where formula works.
looking for an easier way or formula to make calculation that below formula does. Your help will be appreciated.
=ArrayFormula(IFERROR(1/(1/(IF(B3:B="",,LEN(SUBSTITUTE(TRIM(TRANSPOSE(QUERY(TRANSPOSE(IF(
IFERROR(VLOOKUP(ROW(Jan!A3:A), {ROW(Jan!A3:A), Jan!C3:AG, Feb!C3:AE, Mar!C3:AG, Apr!C3:AF, May!C3:AG, Jun!C3:AF, Jul!C3:AG, Aug!C3:AG, Sep!C3:AF, Oct!C3:AG, Nov!C3:AF, Dec!C3:AG},
IF(1=SPLIT(REPT("01", DATE(YEAR(E3:E), MONTH(E3:E)+6, DAY(E3:E))-("01/01/2020"-1)), 0), COLUMN(B:AAA), )*1, 0))<>"C",
IFERROR(VLOOKUP(ROW(Jan!A3:A), {ROW(Jan!A3:A), Jan!C3:AG, Feb!C3:AE, Mar!C3:AG, Apr!C3:AF, May!C3:AG, Jun!C3:AF, Jul!C3:AG, Aug!C3:AG, Sep!C3:AF, Oct!C3:AG, Nov!C3:AF, Dec!C3:AG},
IF(1=SPLIT(REPT("01", DATE(YEAR(E3:E), MONTH(E3:E)+6, DAY(E3:E))-("01/01/2020"-1)), 0), COLUMN(B:AAA), )*1, 0)), )),,9^9))), " ", )))))))
https://docs.google.com/spreadsheets/d/1pgVGJxkw39uelgPU9ceZLXflnP8KaFGou4rJfSsfVXc/edit#gid=0
leave
? how do you define a range, is it calculated by the next available date? in the array? – Umar.H