Once check with this solution, I think it works. Worked for me long back.
Format the memory card once before trying this.( Transfer all your important files to another)
Just remove the Memory card from mobile and connect it to the computer using a card reader.
Now you can see your memory card in removable storage( If it's not visible then open the screen lock in your smartphone).
Open command prompt ( Go to Start Menu and select Run and type cmd and click enter)
Type diskpart and click enter.
You will see DISKPART in capital and type list disk and press enter
You will enter into the Diskpart region and you can see all the real time status of the devices.Here it will show all the details of memory usage of the drivers and also removable devices.
It will display in terms of MB, so watch out for that.Now select the disk which you want to format, in this case, our removable device. ( There will be no name like removable device, it will be named as Disk 0, Disk 1. So you should sort it out by seeing the memory of the disk)
Now type select removable disk ( removable disk should be replaced by the disk name allocated ) and press enter
Type clean and click enter. This will clean your memory card.
Type create partition primary and click enter
Type format fs=fat32 and click enter or format fs=ntfs for 2 different formats.
Type assign and that's it. you are done with the formatting of your memory card.
Looks like a hectic process but will not take more than 5 mins.All the commands to be enter are in bold letters, check that.