Not sure what that error code means, did it say anything else? At what exact point did you get that error? Were you able to format?
Does the drive contain any partitions? Can you create a new partition?
If you keep getting strange things, try installing Ubuntu to the HDD. If that fails too, check the cables and do some low-level diagnostics like the HDD diagnostic utility from your HDD vendor - which is also included on Ultimate Boot CD (UBCD).
What version of Windows are you trying to install?
What kind of hard drive is it?
Some installation CD's won't contain the necessary SATA or RAID drivers needed to properly operate your drive. You may have to slipstream a new installation disk with additional drivers, or load them at the "F6" prompt during Windows Install using a floppy.
How are you reformatting your PC? Are you doing a Factory Default Image? [which reformats your PC to its original state as when you bought it new, this process is pretty much user independent, i mean you don't have anything else to do after click on this option.]
if so, look online or in your manual how to access to this menu is either by pressing
F2,F5 or F8 depending on the brand. also you don't need any CD installation, everything is in the partitioned section of the hard drive.