Can this code be shortened using variables?

Okay...
I read further. I just might figure this out!