I have been using below formula and trying to convert it into Google Sheet App Script. Because I am using number of such conditions with that formula to populate a single result