Resolve #VALUE! errors in conditional median calculations by fixing array formula syntax and ensuring consistent numeric data types.