SPSS has some very powerful data transformation tools. This page will show you some of the basics.

The compute function: