Thank you, I tried it but it gives me error with this
=IF((R2< 33) {S2 = "low"} ELSE IF(R2 >= 33 & R2 < 66) { S2 = "medium" } ELSE IF (R2 >= 66) {S2= "high"})
R S
1 BMI Tertile Group
2 20 Low
3 33 Medium
4 45 High
5 32 Medium
Also my tertile are not <33 , >66.. I am not sure how to calculate them for my data.
ADD COMMENT • link • edit •
May be you can use BMI quantiles. Any thing below 25% is low, any thing above 75% is high and medium is between 25%-75%. Or you can use ntile option from dplyr to divide the data into 3 groups.