Ask LibreOffice - RSS feedhttps://ask.libreoffice.org/en/questions/Questions and answers for LibreOfficeenSat, 02 Jun 2018 01:26:22 +0200How do I test cell for a whole integer (non fractional) and return the value if it is and a blank if not?https://ask.libreoffice.org/en/question/156738/how-do-i-test-cell-for-a-whole-integer-non-fractional-and-return-the-value-if-it-is-and-a-blank-if-not/Have a Series of cells with a formula. I would like to hide and/or return a blank on any cell that less than or more than a whole number. (example .5, 1.25, etc. would not be shown, but 2, 4, etc. would be.
Ps It's been 10yrs since attempting to program. I hope this helps, Thank YouFri, 01 Jun 2018 23:10:15 +0200https://ask.libreoffice.org/en/question/156738/how-do-i-test-cell-for-a-whole-integer-non-fractional-and-return-the-value-if-it-is-and-a-blank-if-not/Answer by hjek for <p>Have a Series of cells with a formula. I would like to hide and/or return a blank on any cell that less than or more than a whole number. (example .5, 1.25, etc. would not be shown, but 2, 4, etc. would be.</p>
<p>Ps It's been 10yrs since attempting to program. I hope this helps, Thank You</p>
https://ask.libreoffice.org/en/question/156738/how-do-i-test-cell-for-a-whole-integer-non-fractional-and-return-the-value-if-it-is-and-a-blank-if-not/?answer=156746#post-id-156746Assuming your numbers are in column A, you can put this in B1 and fill down the B colum: `=IF(MOD(A1,1)=0,A1,"")`Fri, 01 Jun 2018 23:54:56 +0200https://ask.libreoffice.org/en/question/156738/how-do-i-test-cell-for-a-whole-integer-non-fractional-and-return-the-value-if-it-is-and-a-blank-if-not/?answer=156746#post-id-156746Comment by horizon69 for <p>Assuming your numbers are in column A, you can put this in B1 and fill down the B colum: <code>=IF(MOD(A1,1)=0,A1,"")</code></p>
https://ask.libreoffice.org/en/question/156738/how-do-i-test-cell-for-a-whole-integer-non-fractional-and-return-the-value-if-it-is-and-a-blank-if-not/?comment=156747#post-id-156747Spot on, Thank You.Sat, 02 Jun 2018 00:22:55 +0200https://ask.libreoffice.org/en/question/156738/how-do-i-test-cell-for-a-whole-integer-non-fractional-and-return-the-value-if-it-is-and-a-blank-if-not/?comment=156747#post-id-156747Comment by hjek for <p>Assuming your numbers are in column A, you can put this in B1 and fill down the B colum: <code>=IF(MOD(A1,1)=0,A1,"")</code></p>
https://ask.libreoffice.org/en/question/156738/how-do-i-test-cell-for-a-whole-integer-non-fractional-and-return-the-value-if-it-is-and-a-blank-if-not/?comment=156752#post-id-156752Glad it worked for you.
I think you're meant to click the gray check mark circle to the left of my answer to indicate that your question has been answered.Sat, 02 Jun 2018 00:58:51 +0200https://ask.libreoffice.org/en/question/156738/how-do-i-test-cell-for-a-whole-integer-non-fractional-and-return-the-value-if-it-is-and-a-blank-if-not/?comment=156752#post-id-156752Answer by Lupp for <p>Have a Series of cells with a formula. I would like to hide and/or return a blank on any cell that less than or more than a whole number. (example .5, 1.25, etc. would not be shown, but 2, 4, etc. would be.</p>
<p>Ps It's been 10yrs since attempting to program. I hope this helps, Thank You</p>
https://ask.libreoffice.org/en/question/156738/how-do-i-test-cell-for-a-whole-integer-non-fractional-and-return-the-value-if-it-is-and-a-blank-if-not/?answer=156755#post-id-156755Hopefully the Original Questioner is aware of the fact that trusting in computers with this kind of questions comes with risks.
It heavily depends on the kind of "a formula" if its result will be exact enough to allow for distinguishing between integer and non-integer results reliably as needed.
See **[this](/upfiles/1527895523433573.ods)** attached example.Sat, 02 Jun 2018 01:26:22 +0200https://ask.libreoffice.org/en/question/156738/how-do-i-test-cell-for-a-whole-integer-non-fractional-and-return-the-value-if-it-is-and-a-blank-if-not/?answer=156755#post-id-156755