Kemal Demir
Özel Üye
- Katılım
- 29 Temmuz 2004
- Mesajlar
- 2,108
Gunaydın arkadaslar.
elimde ki dodda
ile bağlı olarak b kolonundaki telefon numaralarına alan kodu ekliyor
yalnız
alan kodu eklemesi için bir şart koymam gerekiyor
1.)7 digitten fazla olmayacak azda olmayacak.
7 digitten fazla olanlara alan kodu eklemeyecel
**kod***
Sub alankoduekle()
For C = 2 To 13
If Cells(C, 1).Value = "İZMİR" Then
Cells(C, 2).Value = "232" & Cells(C, 2).Value
End If
If Cells(C, 1).Value = "ANKARA" Then
Cells(C, 2).Value = "312" & Cells(C, 2).Value
End If
If Cells(C, 1).Value = "BURSA" Then
Cells(C, 2).Value = "224" & Cells(C, 2).Value
End If
If Cells(C, 1).Value = "SAMSUN" Then
Cells(C, 2).Value = "362" & Cells(C, 2).Value
End If
If Cells(C, 1).Value = "ADANA" Then
Cells(C, 2).Value = "322" & Cells(C, 2).Value
End If
If Cells(C, 1).Value = "ANTALYA" Then
Cells(C, 2).Value = "242" & Cells(C, 2).Value
End If
Cells(C, 2).NumberFormat = "(###) ### ## ##"
Next
End Sub
****************************************
buraya nasıl bir ilave yapabiliriz.
Yardımcı olursanız sevinirim.
İyi Çalışmalar.
elimde ki dodda
ile bağlı olarak b kolonundaki telefon numaralarına alan kodu ekliyor
yalnız
alan kodu eklemesi için bir şart koymam gerekiyor
1.)7 digitten fazla olmayacak azda olmayacak.
7 digitten fazla olanlara alan kodu eklemeyecel
**kod***
Sub alankoduekle()
For C = 2 To 13
If Cells(C, 1).Value = "İZMİR" Then
Cells(C, 2).Value = "232" & Cells(C, 2).Value
End If
If Cells(C, 1).Value = "ANKARA" Then
Cells(C, 2).Value = "312" & Cells(C, 2).Value
End If
If Cells(C, 1).Value = "BURSA" Then
Cells(C, 2).Value = "224" & Cells(C, 2).Value
End If
If Cells(C, 1).Value = "SAMSUN" Then
Cells(C, 2).Value = "362" & Cells(C, 2).Value
End If
If Cells(C, 1).Value = "ADANA" Then
Cells(C, 2).Value = "322" & Cells(C, 2).Value
End If
If Cells(C, 1).Value = "ANTALYA" Then
Cells(C, 2).Value = "242" & Cells(C, 2).Value
End If
Cells(C, 2).NumberFormat = "(###) ### ## ##"
Next
End Sub
****************************************
buraya nasıl bir ilave yapabiliriz.
Yardımcı olursanız sevinirim.
İyi Çalışmalar.