Google Sheets – Identify Max Value, Divide Others by Half, Then Total

formulasgoogle sheetsgoogle-sheets-arrayformulagoogle-sheets-query

This may be too specific of a formula, but I'm hoping there is a function or script that will accomplish it.

I need a Google Sheet to identify the largest number in a row and divide all of the OTHER numbers by 2, then add the entire row together.

Example: Row 1 has the following numbers… 100, 200, and 300
I would like the sheet to identify 300 as the largest number, divide 100 & 200 in half (50 & 100), then total the whole row together to get 450.

Is this possible?

Best Answer

=SUM(MAX(B12:12), ARRAYFORMULA(QUERY(TRANSPOSE(B12:12), 
 "select Col1 where not Col1 contains '"&MAX(B12:12)&"'")/2))

1