If you have the same experience that format the memory card accidentally and cause all data lost, you can come here to get a data recovery solution. I hope it could help you:
At first, download and install the data recovery software on the computer.
Secondly, insert the formatted memory card to a card reader and then connect it to the computer.
Thirdly, open the data recovery software and choose the recovery model and aim disk to scan.
Fourthly, preview the restorable files after the scan, and pick up the needed to recover.
At last, choose the location to store files to be retrieved. It is better to save them on one of the computer hard disks at that time.