# It's That OpenOffice Spreadsheet Again

• posted on November 13, 2009, 1:47 pm

Oh boy, I wish I was clever.
Using open office spreadsheet. Is it possible to introduce a statement into a cell something like this:
Cell c15:
=(b7+b13)*.05 IF answer is x = > .005 then let x = .01 IF x <= .005 then let x = .00
Hope that is logical to everyone
Jim
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
• posted on November 13, 2009, 2:44 pm

In Excel (and OO should be the same or very similar), then enter in cell C15...
=IF((B7+B13)*0.05>=0.005,0.01,0)
In your post, you have " >= and <= ". Only one equal sign is needed.
--
Martin

<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
• posted on November 13, 2009, 2:49 pm

An afterthought.... slightly neater is ...
=IF(B7+B13>=0.1,0.01,0)
--
Martin

<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
• posted on November 14, 2009, 1:49 am
[Default] On Fri, 13 Nov 2009 14:44:20 -0000, a certain chimpanzee,
and wrote:

Replacing ',' with ';'.
Would decreasing the number of decimal places achieve the desired result?
--
Hugo Nebula
"If no-one on the internet wants a piece of this,
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
• posted on November 15, 2009, 11:43 am

Might it not be better to use an integer statement, to allow rounding of different values too?
Something like:
=int((((b7+b13)*.005)*1000)+0.5)/1000
Seems to work in Excel. To explain:
(b7+b13)*.005 : the original formula. * 1000 : multiply by 1000 to move the decimal point three places to the left +0.5 : add 0.5 int : strip off anything after the decimal point / 1000 : divide by 1000 to move the decimal point three places to the right.
Adding the 0.5 before the 'int' function ensures that values from 0.0 - 0.499 will end up as 0.5 - 0.999, and hence '0' once the decimal part is removed. And values 0.5 - 0.999 will end up as 1.0 - 1.499, and hence '1' once the decimal part is removed.
JW