If you already started formating it's a bit too late now. You could try a program called testdisk and see if it can restore your old partition, it's worked for me before even after formating and re-installing, it still found the old partition and was able to restore it.