List non-blank cell values vertically and sum them up

kanadaaa

Active Member
Joined
Dec 29, 2019
Messages
349
Office Version
  1. 365
Platform
  1. Windows
ABCD
11ac
22ba
33c

I want to extract all non-blank data from the cells in B1:D3, list them vertically without duplicates, and on the right column get the sum of (101-rank) for each extracted value, e.g.
a199 (=(101-1)+(101-2))
b99 (=101-2)
c198 (=(101-3)+(101-1))
where the "rank" is each number in column A.

How can I do this using formulas? I would appreciate your help.
 
Hello, if you have access to GROUPBY function then maybe:

Excel Formula:
=LET(
a,A1:A3,
b,B1:D3,
c,101-a,
d,IF(NOT(ISBLANK(b)),c,NA()),
e,TOCOL(b,1),
f,TOCOL(d,2),
GROUPBY(e,f,SUM,,0))
 
Last edited:
Upvote 0
You can shorten to:
Book1
ABCDEFG
11aca199
22bab99
33cc198
Sheet2
Cell Formulas
RangeFormula
F1:G3F1=GROUPBY(TOCOL(B1:D3,1),TOCOL(IFS(B1:D3<>"",101-A1:A3),2),SUM,,0)
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,226,771
Messages
6,192,918
Members
453,766
Latest member
Gskier

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top