Dear all,

I am trying to execute a fairly simple operation:

Code:
egen duration_desk=rowtotal(t_*_pagesubmit)

The issue I have is that with the code I just showed, I am selecting all my variables that include 't_*_pagesubmit' in their name, and I am only interested in a few of them that luckly are ordered. However, in-between there are other non-related variables that do not follow the 't_*_pagesubmit' formula.

Say I am interested in variables 't_1_pagesubmit' 't_2_pagesubmit' and so on until 't_10_pagesubmit'. I could use a code that selects from 1 to 10 but how can I do that without selecting the variables in-between them?

Of course I could simply type all the variables manually but there must be a simpler way around.
I do apologize if this has been answered, I honestly did not know how to search for such a problem.
Thank you for your time.