Disk is not formatted
Do you want to format it now?

The disk in drive X is not formatted.
Do you want to format it now?

This hard drive ought to be formatted already because it was being used so far, but the message "Disk is not formatted" is displayed suddenly and inaccessible.

This drive is displayed in "My computer" but when trying to access, the error message "not formatted" is occurred.

And that as if add insult to injury, it will ask the confirmation of "Do you want to format it now?" - that nobody would agree.
Of course if formatting according to instructions, it might use for new partitions, instead, the data in it will be start from zero.

Additionally, the message after Vista becomes "You need to format the disk in drive X: before you can use it.".
It have the same meaning as before XP.

Formatting is necessary operations for using these partitions for Windows, but users just want the data kept in the appropriate drive, they do not need to format.
That's why, if being asked "Do you want to format it?", please be special attention to not format as instructions.
*It's not as if all of data will be lost completely but the degree of the data loss will be extensive.

There is almost no doubt that is not good situation but can restore easily in some cases.

Cause of being displayed "Disk is not formatted"

The error message for users to need format means Windows cannot recognize file system.
This means that formatting afresh by file system which Windows can manage because it cannot be recognized that file system.

I confirm the partition by "Disk Management".
They are exist as partitions, but sometimes happen the situation that file system are not displayed.
They are displayed like "RAW" after Vista.

Meaning is,

RAW = not formatted = Windows cannot recognize file system.

They are internally same meaning, only difference in displayed.

Windows has repair file system tool called "Check Disk", but in this case, Check Disk is pointless since it cannot recognize file system.
That's why, Check Disk cannot use for this error.

The main cause of these circumstances are from disk parameters.
These are saved in boot sector of each partition called PBR and informations that become the basis for format of the partition are in it.
It is written about format rules.

If disk parameters are not able to read, it will not be able to access for whole of the partition.
It doesn't know the file system rules, so will not know how to read the whole of the partition.

How to restore without formatting

As above, if disk parameters cannot be recognized correctly, Windows will ask to format of the partition.
That means, conversely, when the error message "Do you want to format it?" is displayed, it is possible to restore if disk parameters can be recognized correctly.

There are two main causes of cannot recognize disk parameters.
In particular,

Following, I will explain step by step.

In case of cannot find PBR

The position of PBR is described in partition table of MBR.
For that reason, if partition table has some errors, you will not be able to find PBR.

Partition table is not correct means also not correct as a partition.
If partition size is wrong, it cause strange size of the partition or emerging unallocated area.

The software as modifying partition table is "TestDisk".
For more information, see below page.

How to use TestDisk

In case of disk parameters are damaged

Disk parameters are in PBR.
It is allowable to Windows asks the format in the sense that PBR will be restructured.

Repairing PBR without formatting, you need to use the tool for it.
You can do it "TestDisk" described above.

Repairing PBR by TestDisk

But please be careful while restoring operations because I think these operations itself concern about bad sector is difficult to understand.
If operate senselessly, there is possibility of deterioration of circumstances.

Recover files

I wrote about logical failure so far, but being asked "Do you want to format?" is not all logical failure.
Sometimes there are causes by incorrectly reading the data from storage.

Finally, Windows intends to format because it cannot recognize file system of the partition, so this cause is likely to occur both logical side and physical side.
Then the existence of bad sectors are cited as incidental cause.
As this is not logical failure but physical failure, so cannot restore completely.

If it is thought that cannot read correctly, easy way is to try recover the file by "PhotoRec" etc.

Repair bad sectors

Since repair operations of bad sectors are generally with overwriting data, so purpose is different from restoring the data.
This is an act so that can read the data correctly, and as a result, has a chance to restore.
Of course if bad sectors are not cause of this error, the operation is to be meaningless and difficult to repair the bad sectors completely.