I'm trying to streamline my code by putting duplicate lines of code into a function or another sub. How would I do this?

For example: I have an IF..ELSEIF..THEN statement with many ELSEIF's. After each ELSEIF I would run the same 10 lines of code. I don't want to have the 10 lines of code under every ELSEIF section. I cannot have the 10 lines of code after the END IF line.