How to split a file using AWK?

Hello,

I have a file like the following:

david,a,b,c,20,r
thomas,a,b,c,30,r
willaiam,a,b,c,80,r
barbara,a,b,c,100,r

I would like to split the file into other files using a condition for the contents of column 5.

The condition should be a if the contents of column 5 is in a range between 10-30 then print to file1 etc

Is this possible?

Many Thanks,

nawk -F, '$5>=10 && $5<=30' OFS=, myInputFile > file1

vgersh99, he means something like this:

awk -F, '{print > "file" int($5/30)}' file

quite possible....

Works well thanks for your help.