# How can I use an equivalent formula for Calc's IF() in Writer? [closed] I know This has probably been asked a few times, but I can't seem to find an answer that helps me at all. I'm aware that IF statements are not available in Writer, but for what I'm working on, unfortunately imbedded calc tables will not do the job.

I need a series of inputs that will register automatic results upon certain inputs (bonus and penalties for attributes, if you're familiar with tabletop RPG gaming).

For example:

If the number input is 9-12 then the resulting output would be zero ("0").
If the number input is less than 9, then the output would be -1.
If the number input is greater than 12, then the input would be +1.

I'm sorry if I appear to be a newb at this. I am certainly a newb at doing formulas in writer, and have figured out how to do this in Calc, but am still not proficient in most of the formulas beyond these basics. Any help would be most greatly appreciated.

edit retag reopen merge delete

### Closed for the following reason the question is answered, right answer was accepted by Alex Kemp close date 2016-02-28 20:38:48.540811

Sort by » oldest newest most voted

I used Calc a lot, but never really used Writer formula. But according to the documentation LibreOffice 4.0 Writer Guide (PDF file) in the chapter "Using spreadsheet functions in a table" on page 282, the main difference between Calc and Writer is in cell referencing, for example in Calc first cell is referenced as A2, but in Writer is <A2>.

So Calc formula: =IF(A1<9;-1;IF(A1>12;1;0)) should become: =IF(<A1><9;-1;IF(<A1>>12;1;0)) but I get an error in Writer: ** Expression is faulty **. Pressing F2 key to get back to Writer formula I get corrupted version of what I have typed in:=IF(<A1><?>>12;1;0))

Don't know if this is a bug or this fits into category "For many simple functions, Writer tables can be used as basic spreadsheets." Maybe too complicated for Writer.

By the way, simple IF formula works fine e.g. =IF(<A1><9;-1;0)

Don't have final answer, but it may be that complicated formulas can't be used directly in Writer. The only other option is embed spreadsheet (Insert | Object | OLE object | Spreadsheet), but you said you don't want it. Maybe type in more details why you can't used it? Maybe you could use Calc file as input file and only reference content in Writer.

more