Forum Discussion
joanauhc
Jul 24, 2024Copper Contributor
Compare 2 columns and sum the larger value in column
Hello, I need help again. This is my formula: =SUM(IF('01-24 DB'!$AK19:$AK156>'01-24 DB'!$AN19:$AN156,'01-24 DB'!$AK19,$AN20)) I would like to compare column AK and AN, and if AK is > AN then i w...
m_tarler
Jul 24, 2024Steel Contributor
that should work except that last value is $AN20 instead of '01-24 DB'!$AN19
the '01-24 DB'! is only needed if that is on a different sheet but row 20 instead of 19 would throw the answer off.
Alternatively you could use other options like:
=SUM('01-24 DB'!$AK19:$AK156, '01-24 DB'!$AN19:$AN156), ABS('01-24 DB'!$AK19:$AK156 - '01-24 DB'!$AN19:$AN156))/2