# It's That OpenOffice Spreadsheet Again

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%>

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%>

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

<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
[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%>

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
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>

## Site Timeline

• ### Why are these CRT TVs are selling for so much money?

• - the site's last updated thread. Posted in Home Repair
• Share To

HomeOwnersHub.com is a website for homeowners and building and maintenance pros. It is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.