Disclaimer: I understand this might not be a statistically sound process, this is purely to better understand the underlying code and not the actual practice of doing this.

I have the following data set in which I have successfully created a new variable wvsrLAD that takes the value of the most recently available value (from variables v26 to mostpe~p, v26 being the most recently available and mostpe~p being the oldest).

Code:
+-------------------------------------------------------------------------------------------------------------------+
countryname   mostpe~p   mostp~19        v22        v23        v24   mostp~20        v26    wvsrLAD    
    
1.Afghanistan          .          .          .          .          .          .          .          .    
2.Albania          .          .          .   .2432432       .232          .          .       .232    
3.Algeria          .          .          .          .   .1076443          .   .1792863   .1792863    
4.Argentina          .   .2700733   .2235529   .1708436   .1501535   .1740575   .1935307   .1935307    
5.Armenia          .          .          .       .235          .          .   .1091358   .1091358    
6.Australia          .   .4781494          .   .3944921          .    .461379   .5181401   .5181401    
7.Austria          .          .          .          .          .          .          .          .    
8.Azerbaijan          .          .          .   .1943057          .          .   .1479329   .1479329    
9.Bahrain          .          .          .          .          .          .       .335       .335    
10.Bangladesh          .          .          .   .2045902   .2326667          .          .   .2326667
I have succeeded in doing what I need- creating the variable wvsrLAD- but the code I used is rather clunky and I know there must be a more elegant solution. What can I do to improve the code?

Code:
replace wvsrLAD = mostpeoplecanbetrustedwvsround20 if missing(v26)
replace wvsrLAD = v24 if missing(v26) & missing(mostpeoplecanbetrustedwvsround20)
replace wvsrLAD = v23 if missing(v24) & missing(v26) & missing(mostpeoplecanbetrustedwvsround20)
replace wvsrLAD = v22 if missing(v23) & missing(v24) & missing(v26) & missing(mostpeoplecanbetrustedwvsround20)