Ask LibreOffice - RSS feedhttps://ask.libreoffice.org/en/questions/Questions and answers for LibreOfficeenMon, 09 Apr 2012 07:01:20 +0200Calc: How do you check an array of cells against a single value?https://ask.libreoffice.org/en/question/1811/calc-how-do-you-check-an-array-of-cells-against-a-single-value/A1="" returns TRUE.<br>A2="" returns TRUE.<br>A3="" returns TRUE.<br>Even (A1="")*(A2="") and AND(A1="";A2="";A3="") return TRUE.
But A1:A3="" returns a #VALUE error. How do you test all the cells in an array/range against a single value?
I can't be the first person in spreadsheet history to want to check an array/range against another value? There must be some way to do it.Mon, 09 Apr 2012 06:28:02 +0200https://ask.libreoffice.org/en/question/1811/calc-how-do-you-check-an-array-of-cells-against-a-single-value/Answer by Pedro for <p>A1="" returns TRUE.<br>A2="" returns TRUE.<br>A3="" returns TRUE.<br>Even (A1="")*(A2="") and AND(A1="";A2="";A3="") return TRUE.</p>
<p>But A1:A3="" returns a #VALUE error. How do you test all the cells in an array/range against a single value?</p>
<p>I can't be the first person in spreadsheet history to want to check an array/range against another value? There must be some way to do it.</p>
https://ask.libreoffice.org/en/question/1811/calc-how-do-you-check-an-array-of-cells-against-a-single-value/?answer=1812#post-id-1812Your condition doesn't apply that way. If you are checking an array for a value, then you should expect an array, not a single value.
In your particular example if you type =A1:A3="" and then press Ctrl+Shift+Enter you will get 3 cells with TRUE.
If you are checking for values, you could use SUM(A1:A3)=0 as a condition instead.Mon, 09 Apr 2012 07:01:20 +0200https://ask.libreoffice.org/en/question/1811/calc-how-do-you-check-an-array-of-cells-against-a-single-value/?answer=1812#post-id-1812