You can't. Formatting is _supposed_ to erase the data.
That said, why are you asking the question? The most common reason is that you had a drive full of data, something nasty happened happened to it, and now when you try to read the drive the system tells you that it is unformatted.
In this case, we turn to recovery tools. The brave among us may try to repair the partition and format information with a tool such as EASEUS, but a mistake may make the files even harder to recover. The wealthy among us use a data recovery lab and pay a couple of thousand dollars.
The rest scan the drive with a tool like Recuva or Clonezilla or any of the dozens of others that will read the drive sector-by-sector and recover as many of the files as possible.
What are your exact circumstances? History, when something changed, what changed?