Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

Using ARRAYFORMULA to do two functions

$
0
0

I have a spreadsheet like this:

4.55.04.55.15.14.5

And I want to achieve a range like this:

4.5 | 35.0 | 15.1 | 2

I can achieve this with two formulas UNIQUE and COUNTIF, but - as far as I know - that requires me to have something like this:

=UNIQUE | =COUNTIF        | =COUNTIF        | =COUNTIF        | =COUNTIF        | ...

How could I condense this down? I know ARRAYFORMULA is probably in the right ballpark, but I'm wondering if there's even a single-celled formula way to achieve this (eg something like ={UNIQUE,ARRAYFORMULA(COUNTIF)} or some sort of notation to do two different formulas at once)

EDIT:

After a bit of messing around, I was able to condense it down to something along the lines of

=UNIQUE | =ARRAYFORMULA(COUNTIF(range,FILTER(unique_range,unique_range<>"")))

But still wondering if there's a better way to do this.


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>