1

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?

3 Answers 3

1

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

1

0
0

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

1

1
  • 1
    Thanks for the answer, Mark. Let me clarify one thing, however, as it may change the formula. The numbers will be input on the same row, but each number in a different column (ie-A12 "100", B12 "200", C12 "300")
    – Tera
    Commented Jan 23, 2019 at 16:08
0

Let me give this a crack:

=(SUM(B2:2)-MAX(B2:2))/2 + MAX((B2:2))

Presuming all the data is in the one row, the above should work, just drag it down. Should be easier to understand too.

The idea is to sum the whole row, subtract the largest number, divide that total by two then add the largest number back in.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.