Have you got back all your important files?
I hope you could post with much more details of your problems.
What kind of format have you done, quick format or full format?
Quick format (which often could be finished quickly) generally could not actually erase your data from the formatted drive or storage device. It is only the space that is marked as "free space" so that new data could be easily stored there.
So, if you have done a quick format, you could easily
restore all your files back for free with the help of a drive data recovery freeware, provided that you've not overwritten them with any new data.
However, if you've done a full format (which often would erase your data completely), it could be much more difficult to restore all your data back.
Note: In the future, you should always remember to back up all your important data on a different drives before you try to d some changes to your data or computer system.