If you formatted it and lost your connection then you have probably lost the driver for the wireless card and the password if u have one for the router, check the model laptop get the driver on usb, install it then connect and if you have any security on router you forgot delete it and set it up again by plugging ur computer in with a wire to the router and typing ur ip in the Address bar of explorer.