# IF .... OR Statement

hello,i need some help on office calc. Any idea how can i tranfer the condition bellow to calc ?

- if 0<=B1<=20 then C1=0
- if 21<=B1<=45 then C1=0.5
- if 46<=B1<=59 then C1=1

Thanks in advance.

First time here? Check out the FAQ!

IF .... OR Statement

hello,i need some help on office calc. Any idea how can i tranfer the condition bellow to calc ?

- if 0<=B1<=20 then C1=0
- if 21<=B1<=45 then C1=0.5
- if 46<=B1<=59 then C1=1

Thanks in advance.

0

=IF(AND(B1>=0;B1<=20);0;IF(AND(B1>=21;B1<=45);0,5;IF(AND(B1>=46;B1<=59);1;"Not in any range")))

You can also use IFS function to get rid of nested IF statements and to make scaling easier if needed `=IFNA(IFS(AND(B1>=0;B1<=20);0;AND(B1>=21;B1<=45);0.5;AND(B1>=46,B1<=59);1);"Not in any range")`

For contiguous range I suggest better to use VLOOKUP function combined with the lookup table. Some samples here and here

0

Asked: ** 2019-02-12 19:43:34 +0100 **

Seen: **51 times**

Last updated: **Feb 13**

how to loop through csv file and delete rows that contain X

How to reach the bottom of a sheet with a click? [closed]

Counting Date Occurances [closed]

How do I delete filters created

Slightly complex formula in calc fails

How do I right align with an indent in a Calc cell?

Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.

... and what if B1 = -1? 20.5? 45.5? 60?