Can't boot into Windows from GRUB after formatting old Windows drive
Solution 1:
Grub 2 has the capability to auto-detect other operating systems and automatically add an entry to the boot menu for them. Since your setup has changed after formatting the drive, you should re-run the detection script using the following command:
sudo update-grub
Solution 2:
For temporary solution you can still boot into windows using bios or one time boot menu. for updating the GRUB entry just run grub update from ubuntu which you have installed