## [Solved] How should I write this IF() formula?

### [Solved] How should I write this IF() formula?

How would I write a formula to show (for example) the contents of A3 in A1 if A2 is within a stated bracketed value relative to A4?

For example inputting in A1, IF(A2=+-1ofA4;A3;"") The "+-1ofA4" bit is what I don't know. The result should be if the number in A2 is plus or minus 1 from the value in A4 then A3 is shown in A1, otherwise blank.

Thanks.
Last edited by Veda on Sat Aug 11, 2018 10:24 pm, edited 2 times in total.
Win 10, open office 4.1.5
Veda

Posts: 26
Joined: Mon Apr 16, 2018 1:18 am

### Re: How should I write this IF() formula?

IF(ABS(A2-A4)<=1;A3;"")
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 16.04, OpenOffice 4.x & LibreOffice 5.x

Villeroy
Volunteer

Posts: 25567
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

### Re: "SOLVED" How should I write this IF() formula?

Villeroy wrote:IF(ABS(A2-A4)<=1;A3;"")

Perfect, Thanks a lot
Win 10, open office 4.1.5
Veda

Posts: 26
Joined: Mon Apr 16, 2018 1:18 am