jeudi 29 octobre 2015

Excel: IF statement, Number less than X but greater than Y

Within my program I have a column(H) specifying hours (24.2, 23.5, 21.5, 25.0, 28.3, 23.1, 22.5, 17.9, 22.1, 16.2, 24.3, 23.8)this continues for 600 or so more rows.
Max hours = 36.88348 Min hours = 16.15569.
I'm trying to categorise the hours into 4 different numbers to later use for more accurate data than averages:
0 = 16-20, 1 = 21-25, 2 = 26-30, 3 = 31>.
So far I have came to this solution: =IF($H4>=31,3,IF($H4<=20,0,IF($H4>=21<=25,1,IF($H4>=26,2))))
This works apart from the 21-25($H4>=21<=25,1)
If anybody could assist me, i believe it's something basic as my syntax. Thanks much appreciated.

Aucun commentaire:

Enregistrer un commentaire