To transfer your Yahoo contacts to your iCloud account on, follow these steps:
1. Login to Yahoo and export all your contacts to a CSV file for insurance purposes. If this goes wrong, you can reload them into Yahoo.
2. On your iphone or iPad, disable contact sync for both Yahoo and iCloud. When asked, elect to keep your contacts on the iPhone. This should only apply to iCloud contacts.
3. Open iTunes and connect your iphone.
4. You then need to change the
contact sync settings to Yahoo
AND at the bottom of the screen, check the transfer to iphone option.
5. Run a sync which will then put all your contacts on your iPhone.
6. When complete, in iTunes, remove the Yahoo contact sync option. Your contacts are now on you iphone and disconnected from Yahoo.
7. on the iphone, enable iCould contacts. This will push you contacts from the iphone to iCloud
8. Login to
www.icloud.com using your Apple ID and confirm your contacts are synced to iCloud
9. You can then enable iCloud contacts on other devices such as your iPad and they will remain in sync.
Note: After you use iTunes to copy your contacts from Yahoo to your iPhone, you can also just enable iCloud contacts on the iphone after the sync while the phone is connected. This removes the 'sync to yahoo' iTunes config.
This works for iPhone 4 and iPad 2 running iTunes on Windows. I have verified this for a MAC platform but I believe it would work.
This approach may also work for moving your Google contacts.