Quick update in case anyone is interested. I had to run a second survey and implemented the solution proposed by
@Joffm (thanks again!). I mean this solution:
{if(age>79,8,if(age>69,7,if(age>59,6,if(age>49,5,if(age>39,4,if(age>29,3,if(age>19,2,1)))))))}
It worked well except for one serious caveat I wanted to warn everybody about:
The order of my survey was: question on gender in one question group and then a new question group with an age question and the code in a separate question. According to the code, everyone that does not fulfill the conditions in the equation gets assigned a 1 - as intended. For me, this was the youngest age group 16-19 that also had a quota. Once this quota was full, every participant got a quota full and got kicked out - even before they were able to the age question. Why? After playing around a bit I suspect that the equation is directly triggered when the respective question group is opened, leading everybody to receive the default 1. This default 1 is overwritten, once they answer the age question. However, when the quota for 1 (16-19 yrs) is full, they are already kicked out of the survey, not even having the chance to state their age. Not good. I noticed only after two days. Luckily there is an easy fix:
Two solutions:
1) I implemented a new default ("else"-option) that is not connected to any quota. I simply use this code now:
{if(age > 79, 8, if(age > 69, 7, if(age > 59, 6, if(age > 49, 5, if(age > 39, 4, if(age > 29, 3, if(age > 19, 2, if(age <= 19, 1, 0))))))))}
with the 0 having no connection to any quota.
2) Not tested but suspected: I think if the code is put into a different question group it should work.
Hope this is of help to anyone