How to calculate a weighted median in LibreOffice Calc?

Please note that a weighted median is not the same as a weighted mean. Weighted median - Wikipedia

I have a column of data, NOT in rank order, and a column of weights next to it. I would like to know its weighted median.

(A big bonus would be calculating the Theil-Sen estimator, but that seems too much to ask for.)


Please upload your ODF type sample file here.