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

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




Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

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



Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
[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,
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

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

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.