A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
If you have a recent version of Excel:
=LET(v, IF(D2>37, MAX(B2:C2), B2), IF(v=0, E2, v))
In older versions:
=IF(IF(D2>37, MAX(B2:C2), B2)=0, E2, IF(D2>37, MAX(B2:C2), B2))