I've been chasing my tail all day. I would like a sum of the unique values in column H.

I'm attempting to use a SUM, FREQUENCY, IF, and SUBTOTAL combination:

Formula: copy to clipboard
=SUM(IF(FREQUENCY(IF(SUBTOTAL(9,OFFSET(H3:H110,ROW(H3:H110)-ROW(H3),0,1)),MATCH("~"&H3:H110,H3:H110&"",0)),ROW(H3:H110)-ROW(H3)+1),1))


This counts the number of unique values, despite using the SUBTOTAL function_num 9 (sum) instead of 3 (count).

If Col H has the figures below, the formula should add like this 4320+96021+537131+640000, instead of telling me there's 4 unique values.
4320
4320
4320
96021
96021
96021
537131
537131
537131
640000


Could someone help? Thanks!!