OS X Yosemite: If you can’t connect Windows and Mac computers
Make sure your Mac is connected to the network. To check your connection, open the Network pane of System Preferences (choose Apple menu > System Preferences, then click Network). Your type of network connection is listed on the left. The indicator next to it should be green.
If there’s a problem with your network connection, use Network Diagnostics on the Mac to troubleshoot.
If the computers are supposed to be in the same workgroup and on the same local network or subnetwork, make sure the workgroup name is exactly the same on both.
Make sure you typed the computer names and workgroup name correctly.
Make sure you typed the user name and password exactly as they are entered on the Mac.
In some cases, you may need to reset the password for the account in Users & Groups preferences.
Make sure you typed the user name and password exactly as they are entered on the Windows computer.
The password for the user account you are using may need to be re-entered on the Windows computer.
In some cases, the Windows computer may need to be restarted after the password is changed.
If you see a message that the folder you specified isn’t valid, and you’re sure you entered the information correctly, check to see whether the Mac is in sleep mode.
If you don’t have access to one or both computers, contact the computer or network administrator for help.
Check Windows Help and Microsoft support services for more information about setting up file sharing on your Windows computer.