Calculate standard deviation of specific rows

Hi!

I have a table formatted similar to this:

v   1
v   4
v   2
s   1
s   1
v   8
s   2

How can I calculate the standard deviation of rows that have an “s” in the first column? I tried: =STDEV(IF(A1:A10=“s”,B1:B10)) and all variations that I could think of but it does not work.

You need to enter as an array function using ctrl-shift-enter or check the array box in the function wizard.