I think with a 2" pipe, it has to be within 5', so IF I'm correct, that part is okay. BUT, a vent, like a drain must not have a place where moisture could accumulate (i.e., it CANNOT go up/down/up - it must contain a continuous path for moisture to flow should any get into that pipe) plus, code says it must go at least 6" above any other drains in that run OR 42" above the floor, whichever is higher before it can go horizontal. Any rain, snowmelt, condensation, etc. that gets into that pipe where it goes back down for a bit will accumulate, block it off, and make it inoperative. Sometimes, you just have to bite the bullet if you want it done right.