Well, there are a number of ways of doing this.
I am assuming that you have only one hard drive, that's why you have this problem. In future, you should aim to keep your OS and programs on one partition or hard drive, and your user data on another.
If your machine can still be booted, then copy any data to Zip disks or CD-RW, or whatever, if you can.
If you do this, and you are planning on formatting your hard drive, then I recommend thinking perhaps about partitioning it as well. Have a partition for the operating system, C:, and then maybe a D: for documents, pictures, mp3s, and so forth.
If its not bootable, then maybe you can get into DOS, and simply deltree the Windows Directory, Program Files Directory, and anything else that you didn't create. Then reinstall again, without formatting the partition. It will be badly fragmented, so run the disk defragmenter.
You could also buy another hard drive, fit that as primary master HDD and install the new OS installation to there, when finished remove any unneeded directories from the old disk, preserving the data you wanted to keep, and then use that old drive for data only. That's a good idea.