Soru T.C. Kimlik No Doğrulama

TURKOLOG

Altın Üye
Katılım
13 Kasım 2008
Mesajlar
744
Excel Vers. ve Dili
2016 64 TR
Altın Üyelik Bitiş Tarihi
29-10-2026
Arkadaşlar merhaba benim sorumun user formda
Texbox 1 e 11 haneli kimlik numarası yazılacak ama bunun doğru olup olmadığı combobutton1 e basılınca verilecek mesajla gösterilmesini istiyorum.
Kimlik doğrulama başarılı veya kimlik doğrulama basarız gibi

Bilinmesi gerekenler


TC kimlik numaraları verilirken sorgularda kolaylık sağlanması açısından belli bir kural çerçevesinde oluşturulmuş 11 haneli rakamlardan oluşan bir numara ile karşılaşılmaktadır. Bu yazımızda TC kimlik numarası oluşturulurken kullanılan kurallar

Web tabanlı uygulamalarda öncelikle kendi birimleri için olmak üzere sorguda direkt 70 küsür milyon numarayı bir anda sorguya sokmamak için basit bir TC kimlik numarası geçerlilik algoritması oluşturulmuştur. Bu basit algoritma ile eğer geçersiz bir numara girildiğinde sorguya hiç girmeden kodlamadan çıkılır. Bu uygulamayı kendi çalışmalarınızdada en azından geçerlilik kontrolü yapmak için kullanabilirsiniz. Çok uzatmadan bu kurallar zincirine geçelim.

Öncelikle TC kimlik numarası 11 haneli rakamlar dizisinden oluşur. Örneğimiz için 12345678950 gibi 11 haneli bir kimlik numarası kullanalım.

1. Aşama=

TC kimlik numarasının 1, 3, 5, 7 ve 9. karakterleri toplanır ve 7 ile çarpılır.

1 + 3 + 5 + 7 + 9 = 25 ==> 25 * 7 = 175

2. Aşama=

TC kimlik numarasının 2, 4, 6 ve 8. karakterleri toplanır. Çıkan sonuç 1. aşamada elde edilen sonuçtan çıkartılır ve çıkan sonucun 10 bölümünden kalan sayı bulunur (mod'u hesaplanır). Bu sayının TC kimlik numarasının 10. karakterine eşit olması gerekir.

2 + 4 + 6 + 8 = 20 ==> mod((175-20)/10) = 5 çıkan sayı TC kimlik numarasının 10. karakteri olan 5'e eşit.

İşleme devam edin;

3. Aşama=

İlk iki aşamadaki doğruluk sağlandıktan sonra 3. aşamayla işlem tamamlanır. TC kimlik numarasının ilk 10 karakteri toplanır ve çıkan sonucun modu yani 10'a bölümünden kalan sayı hesaplanır. Çıkan bu sayının ise TC kimlik numarasının 11. karakterine eşit olması gerekiyor.

1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 5 = 50 ==> mod(50/10) = 0 çıkan sayı TC kimlik numarasının 11. karakteri olan 0'a eşit.
 

Haluk

𐱅𐰇𐰼𐰚
Katılım
7 Temmuz 2004
Mesajlar
12,289
Excel Vers. ve Dili
64 Bit 2010 - İngilizce
+
Google Sheets
+
JScript
Altın Üyelik Bitiş Tarihi
Özel kişi
Bu forumu araştırdınız mı ?

Birşeyler vardı, hatırlıyorum ...

.
 

Haluk

𐱅𐰇𐰼𐰚
Katılım
7 Temmuz 2004
Mesajlar
12,289
Excel Vers. ve Dili
64 Bit 2010 - İngilizce
+
Google Sheets
+
JScript
Altın Üyelik Bitiş Tarihi
Özel kişi
Bendeki bir dosyada kullandığım formül de aşağıda;

(A1 hücresine yazılmış bir TCNO'yu doğrular, ama böyle bir TCNO'lu gerçekten bir şahıs var mı ? Orası anlaşılmaz...)

Kod:
=IF(RIGHT(A1;1)+0=MOD(SUMPRODUCT(1*MID(A1;ROW(INDIRECT("1:10"));1));10);"Tamam";"Hatalı TC No")
.
 

TURKOLOG

Altın Üye
Katılım
13 Kasım 2008
Mesajlar
744
Excel Vers. ve Dili
2016 64 TR
Altın Üyelik Bitiş Tarihi
29-10-2026
Kod:
Private Sub TextBox46_Exit(ByVal Cancel As MSForms.ReturnBoolean)
On Error Resume Next
If TextBox46.TextLength <> 11 Then
'MsgBox "TC Kimlik numarası 11 Rakamdan oluşmalıdır.", vbCritical, "Hatalı !" 'X
TextBox46.Text = ""
Exit Sub
End If

Dim mod1 As Integer, mod2 As Integer, TC1 As Integer, TC2 As Integer, TC3 As Integer, TC4 As Integer, TC5 As Integer, TC6 As Integer, TC7 As Integer, TC8 As Integer, TC9 As Integer, TC10 As Integer, TC11 As Integer
TC1 = Mid(TextBox46, 1, 1)
TC2 = Mid(TextBox46, 2, 1)
TC3 = Mid(TextBox46, 3, 1)
TC4 = Mid(TextBox46, 4, 1)
TC5 = Mid(TextBox46, 5, 1)
TC6 = Mid(TextBox46, 6, 1)
TC7 = Mid(TextBox46, 7, 1)
TC8 = Mid(TextBox46, 8, 1)
TC9 = Mid(TextBox46, 9, 1)
TC10 = Mid(TextBox46, 10, 1)
TC11 = Mid(TextBox46, 11, 1)

mod1 = ((((TC1 + TC3 + TC5 + TC7 + TC9) * 7) - (TC2 + TC4 + TC6 + TC8)) Mod 10)
mod2 = ((TC1 + TC2 + TC3 + TC4 + TC5 + TC6 + TC7 + TC8 + TC9 + TC10) Mod 10)

If mod1 = TC10 And mod2 = TC11 Then
MsgBox TextBox2 & " Geçerli TC kimlik numarası", vbInformation, "Bilgilendirme !"
Else
MsgBox TextBox46 & " Geçersiz TC kimlik numarası", vbExclamation, "Dikkat !"
TextBox46.Text = ""
End If

End Sub
Bu kodu ekliyorum misal TC7 = Mid(TextBox46, 7, 1) herhangi bir yerde Mid yazısı mavi olup hata veriyor.
 
Katılım
31 Aralık 2014
Mesajlar
1,845
Excel Vers. ve Dili
Excel 2010
Merhaba
Aşağıda kullandığım kod bulunuyor, denermisiniz?

Kod:
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Trim(TextBox1) = "" Then Exit Sub
If Len(TextBox1) <> 11 Then MsgBox "TC 11 haneli olmalı": GoTo 10
If IsNumeric(TextBox1) = False Then MsgBox "TC rakamlardan oluşmalı": GoTo 10
If Left(TextBox1, 1) = "0" Then MsgBox "İlk Rakam Sıfır olmaz": GoTo 10
Dim c As Long, c2 As Long, l As Long, t As Variant, s As Variant
Dim zn As Long, nz As Long, nzzn As Long, deg As Double
t = Array("1", "3", "5", "7", "9")
s = Array("2", "4", "6", "8")
deg = TextBox1
For a = LBound(t) To UBound(t)
c = t(a)
tt1 = tt1 + CDbl(Mid(deg, c, 1))
If a < UBound(t) Then
c2 = s(a)
tt2 = tt2 + CDbl(Mid(deg, c2, 1))
End If
Next
nz = 7 * tt1 '1
zn = 9 * tt2 '2
nzzn = nz + zn
If Mid(deg, 10, 1) = Right(nzzn, 1) Then l = l + 1
nzzn = nz - tt2
If Mid(deg, 10, 1) = Right(nzzn, 1) Then l = l + 1
For a = 1 To 10
ht = CDbl(Mid(deg, a, 1)) + ht
Next
If Right(deg, 1) = Right(ht, 1) Then l = l + 1
nc = tt1 * 8
If Right(deg, 1) = Right(nc, 1) Then l = l + 1
If l <> 4 Then
MsgBox "TC no geçerli değil"
10:
End If
End Sub
 

TURKOLOG

Altın Üye
Katılım
13 Kasım 2008
Mesajlar
744
Excel Vers. ve Dili
2016 64 TR
Altın Üyelik Bitiş Tarihi
29-10-2026
Merhaba
Aşağıda kullandığım kod bulunuyor, denermisiniz?

Kod:
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Trim(TextBox1) = "" Then Exit Sub
If Len(TextBox1) <> 11 Then MsgBox "TC 11 haneli olmalı": GoTo 10
If IsNumeric(TextBox1) = False Then MsgBox "TC rakamlardan oluşmalı": GoTo 10
If Left(TextBox1, 1) = "0" Then MsgBox "İlk Rakam Sıfır olmaz": GoTo 10
Dim c As Long, c2 As Long, l As Long, t As Variant, s As Variant
Dim zn As Long, nz As Long, nzzn As Long, deg As Double
t = Array("1", "3", "5", "7", "9")
s = Array("2", "4", "6", "8")
deg = TextBox1
For a = LBound(t) To UBound(t)
c = t(a)
tt1 = tt1 + CDbl(Mid(deg, c, 1))
If a < UBound(t) Then
c2 = s(a)
tt2 = tt2 + CDbl(Mid(deg, c2, 1))
End If
Next
nz = 7 * tt1 '1
zn = 9 * tt2 '2
nzzn = nz + zn
If Mid(deg, 10, 1) = Right(nzzn, 1) Then l = l + 1
nzzn = nz - tt2
If Mid(deg, 10, 1) = Right(nzzn, 1) Then l = l + 1
For a = 1 To 10
ht = CDbl(Mid(deg, a, 1)) + ht
Next
If Right(deg, 1) = Right(ht, 1) Then l = l + 1
nc = tt1 * 8
If Right(deg, 1) = Right(nc, 1) Then l = l + 1
If l <> 4 Then
MsgBox "TC no geçerli değil"
10:
End If
End Sub
çok teşekkür ederim elinize emeğinize sağlık
 

TURKOLOG

Altın Üye
Katılım
13 Kasım 2008
Mesajlar
744
Excel Vers. ve Dili
2016 64 TR
Altın Üyelik Bitiş Tarihi
29-10-2026
Bunlar daha sonra bu konu ile ilgileneceklere yardımcı olacaktır
Ayrıca alttaki kodlarda meraklılarına


Kod:
Private Sub CommandButton5_Click()

Dim bul As Range
       
    For Each bul In Range("B2:B" & WorksheetFunction.CountA(Range("B1:B500000")))
       

    If StrConv(bul.Value, vbUpperCase) = StrConv(TextBox22.Text, vbUpperCase) Then
         

         bul.Select

     
    TextBox22.Value = ActiveCell.Offset(0, 1).Value
    TextBox23.Value = ActiveCell.Offset(0, 2).Value
    TextBox24.Value = ActiveCell.Offset(0, 3).Value
    ComboBox15.Value = ActiveCell.Offset(0, 4).Value
    ComboBox16.Value = ActiveCell.Offset(0, -15).Value
    TextBox25.Value = ActiveCell.Offset(0, -14).Value
    ComboBox17.Value = ActiveCell.Offset(0, -13).Value
    TextBox26.Value = ActiveCell.Offset(0, -12).Value
    TextBox27.Value = ActiveCell.Offset(0, -11).Value
    ComboBox19.Value = ActiveCell.Offset(0, -10).Value
    ComboBox20.Value = ActiveCell.Offset(0, -5).Value
    ComboBox21.Value = ActiveCell.Offset(0, -4).Value
     TextBox62.Value = ActiveCell.Offset(0, -3).Value
     TextBox63.Value = ActiveCell.Offset(0, -2).Value
         

    Exit Sub
   
    End If
   
    Next bul

    MsgBox ("KAYIT BULUNAMADI"), vbCritical, "ARANAN SONUÇ"
End Sub

Private Sub Değiştir_Click()
ActiveCell.Offset(0, -19) = TextBox22
ActiveCell.Offset(0, -18) = TextBox23
ActiveCell.Offset(0, -17) = TextBox24
ActiveCell.Offset(0, -16) = ComboBox15
ActiveCell.Offset(0, -15) = ComboBox16
ActiveCell.Offset(0, -14) = TextBox25
ActiveCell.Offset(0, -13) = ComboBox17
ActiveCell.Offset(0, -12) = TextBox26
ActiveCell.Offset(0, -11) = TextBox27
ActiveCell.Offset(0, -10) = ComboBox19
ActiveCell.Offset(0, -5) = ComboBox20
ActiveCell.Offset(0, -4) = ComboBox21



TextBox22.Text = ""
TextBox23.Text = ""
TextBox24.Text = ""
ComboBox15.Text = ""
ComboBox16.Text = ""
TextBox25.Text = ""
ComboBox17.Text = ""
TextBox26.Text = ""
TextBox27.Text = ""
ComboBox18.Text = ""
ComboBox19.Text = ""
ComboBox20.Text = ""
ComboBox21.Text = ""
End Sub

Private Sub Kaydet_Click()
Dim SonSatır
SonSatır = WorksheetFunction.CountA(Worksheets("VERİ").Range("A:A")) + 1
Cells(SonSatır, "A").Value = WorksheetFunction.Max(Range("A2:A" & Rows.Count)) + 1

Worksheets("VERİ").Cells(SonSatır, 2) = TextBox22.Text
Worksheets("VERİ").Cells(SonSatır, 3) = TextBox23.Text
Worksheets("VERİ").Cells(SonSatır, 4) = TextBox24.Text
Worksheets("VERİ").Cells(SonSatır, 5) = ComboBox15.Text
Worksheets("VERİ").Cells(SonSatır, 6) = ComboBox16.Text
Worksheets("VERİ").Cells(SonSatır, 7) = TextBox25.Text
Worksheets("VERİ").Cells(SonSatır, 8) = ComboBox17.Text
Worksheets("VERİ").Cells(SonSatır, 9) = TextBox26.Text
Worksheets("VERİ").Cells(SonSatır, 10) = TextBox27.Text
Worksheets("VERİ").Cells(SonSatır, 11) = ComboBox18.Text
Worksheets("VERİ").Cells(SonSatır, 12) = ComboBox19.Text
Worksheets("VERİ").Cells(SonSatır, 13) = ComboBox20.Text
Worksheets("VERİ").Cells(SonSatır, 14) = ComboBox21.Text

TextBox22.Text = ""
TextBox23.Text = ""
TextBox24.Text = ""
ComboBox15.Text = ""
ComboBox16.Text = ""
TextBox25.Text = ""
ComboBox17.Text = ""
TextBox26.Text = ""
TextBox26.Text = ""
TextBox27.Text = ""
ComboBox18.Text = ""
ComboBox19.Text = ""
ComboBox20.Text = ""
ComboBox21.Text = ""
MsgBox "Kayıt İşlemi Tamamlandı"
End Sub




Private Sub TextBox22_Change()
If Len(TextBox22) = 6 Then TextBox23.SetFocus

If Not IsNumeric(Replace(Replace(Replace(TextBox22.Text, "(", ""), ")", ""), " ", "")) Then

    TextBox22.SetFocus
    TextBox22.SelStart = 0
    TextBox22.SelLength = Len(TextBox22.Text)
   
End If
End Sub






Private Sub UserForm_Initialize()
TextBox21.Text = WorksheetFunction.Max(Sheets("VERİ").Range("A1:A65536")) + 1
End Sub

Private Sub TextBox25_Change()

If Len(TextBox25) = 11 Then TextBox26.SetFocus
TextBox25.MaxLength = 11
If Not IsNumeric(Replace(Replace(Replace(TextBox25.Text, "(", ""), ")", ""), " ", "")) Then
    TextBox25.SetFocus
    TextBox25.SelStart = 0
    TextBox25.SelLength = Len(TextBox25.Text)
    MsgBox "TC Kimlik Numarası 11 Haneli ve Rakamlardan Oluşmalıdır"

  If Len(TextBox25) = 11 Then TextBox26.SetFocus

    End If

End Sub

Private Sub TextBox25_Exit(ByVal Cancel As MSForms.ReturnBoolean)
On Error Resume Next
If TextBox25.TextLength <> 11 Then
'MsgBox "TC Kimlik numarası 11 Rakamdan oluşmalıdır.", vbCritical, "Hatalı !" 'X
TextBox25.Text = ""
Exit Sub
End If

Dim mod1 As Integer, mod2 As Integer, TC1 As Integer, TC2 As Integer, TC3 As Integer, TC4 As Integer, TC5 As Integer, TC6 As Integer, TC7 As Integer, TC8 As Integer, TC9 As Integer, TC10 As Integer, TC11 As Integer
TC1 = Mid(TextBox25, 1, 1)
TC2 = Mid(TextBox25, 2, 1)
TC3 = Mid(TextBox25, 3, 1)
TC4 = Mid(TextBox25, 4, 1)
TC5 = Mid(TextBox25, 5, 1)
TC6 = Mid(TextBox25, 6, 1)
TC7 = Mid(TextBox25, 7, 1)
TC8 = Mid(TextBox25, 8, 1)
TC9 = Mid(TextBox25, 9, 1)
TC10 = Mid(TextBox25, 10, 1)
TC11 = Mid(TextBox25, 11, 1)

mod1 = ((((TC1 + TC3 + TC5 + TC7 + TC9) * 7) - (TC2 + TC4 + TC6 + TC8)) Mod 10)
mod2 = ((TC1 + TC2 + TC3 + TC4 + TC5 + TC6 + TC7 + TC8 + TC9 + TC10) Mod 10)

If mod1 = TC10 And mod2 = TC11 Then
MsgBox TextBox25 & " Geçerli TC kimlik numarası", vbInformation, "Bilgilendirme !"
Else
MsgBox TextBox25 & " Geçersiz TC kimlik numarası", vbExclamation, "Dikkat !"
TextBox25.Text = ""
End If

End Sub

Private Sub TextBox26_AfterUpdate()
TextBox26.Text = Format(TextBox26.Text, "(000) 000 00 00")
If Len(TextBox26) = 11 Then TextBox27.SetFocus
End Sub
Private Sub TextBox27_Change()
If Len(TextBox27) = 4 Then ComboBox18.SetFocus

If Not IsNumeric(Replace(Replace(Replace(TextBox27.Text, "(", ""), ")", ""), " ", "")) Then
    ComboBox18.SetFocus
    TextBox27.SelStart = 0
    TextBox27.SelLength = Len(TextBox27.Text)
    End If
End Sub
Private Sub TextBox28_Change()
TextBox28 = Format(TextBox28, "00"".""00"".""0000")
TextBox28.MaxLength = 11
End Sub

Private Sub CommandButton15_Click()
Dim fso As Object, ad As Object
ChDir ("C:\")
dosya = Application.GetOpenFilename(filefilter:="Tüm Dosyalar (*.*),*.*", Title:="BİR DOSYA SEÇİNİZ...")
If dosya = False Then Exit Sub
Set fso = CreateObject("Scripting.FileSystemObject")
Set ad = fso.Getfile(dosya)
TextBox9.Value = ad.Name
TextBox8.Text = dosya
End Sub





Private Sub CommandButton8_Click()
Dim fso As Object, ad As Object
ChDir ("C:\")
dosya = Application.GetOpenFilename(filefilter:="Tüm Dosyalar (*.*),*.*", Title:="BİR DOSYA SEÇİNİZ...")
If dosya = False Then Exit Sub
Set fso = CreateObject("Scripting.FileSystemObject")
Set ad = fso.Getfile(dosya)
TextBox11.Value = ad.Name
TextBox10.Text = dosya
End Sub

Private Sub CommandButton9_Click()
Dim fso As Object, ad As Object
ChDir ("C:\")
dosya = Application.GetOpenFilename(filefilter:="Tüm Dosyalar (*.*),*.*", Title:="BİR DOSYA SEÇİNİZ...")
If dosya = False Then Exit Sub
Set fso = CreateObject("Scripting.FileSystemObject")
Set ad = fso.Getfile(dosya)
TextBox13.Value = ad.Name
TextBox12.Text = dosya
End Sub



Private Sub UserForm_Initialize()
TextBox14.Text = WorksheetFunction.Max(Sheets("HAVUZ").Range("A1:A65536")) + 1
End Sub

Private Sub UserForm_Activate()
Me.Caption = "KAYIT MODÜLÜ"
End Sub

Private Sub TextBox5_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox5 = Format(TextBox5, "dd.mm.yyyy")
End Sub
Private Sub TextBox6_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox6 = Format(TextBox6, "dd.mm.yyyy")
End Sub

Private Sub ComboBox1_Change()
Application.ScreenUpdating = False
On Error Resume Next
Set s1 = ThisWorkbook.Worksheets("DATA1")
Call form_temizle
sırası1 = 0: sırası2 = 0
sonsat1 = s1.Range("A65536").End(xlUp).Row
sırası1 = WorksheetFunction.Match(ComboBox1, s1.Range("b1:b" & sonsat1), 0)



Set s2 = ThisWorkbook.Worksheets("DATA1")
sonsat2 = s2.Range("A65536").End(xlUp).Row
sırası2 = WorksheetFunction.Match(ComboBox1, s2.Range("b1:b" & sonsat2), 0)

If sırası2 >= 2 Then
TextBox1 = s2.Cells(sırası2, "c")
TextBox2 = Format(s2.Cells(sırası2, "d"), "dd.mm.yyyy")
TextBox16 = Format(s2.Cells(sırası2, "e"), "dd.mm.yyyy")
TextBox4 = s2.Cells(sırası2, "f")
End If
Label14 = varyok

End Sub

Sub form_temizle()
For i = 1 To 7
Controls("TextBox" & i) = ""
Next i
End Sub


Private Sub CommandButton1_Click() 'kaydet butonu
Application.ScreenUpdating = False
On Error Resume Next
Set s1 = ThisWorkbook.Worksheets("DATA1")
Set s2 = ThisWorkbook.Worksheets("havuz")
sırası1 = 0: sırası2 = 0
sonsat1 = s1.Range("A65536").End(xlUp).Row
sırası1 = WorksheetFunction.Match(ComboBox1, s1.Range("b1:b" & sonsat1), 0)


sonsatir2 = s2.Range("A65536").End(xlUp).Row + 1
If sırası2 >= 2 Then sonsatir2 = sırası2
s2.Cells(sonsatir2, "a") = sonsatir2 - 1
s2.Cells(sonsatir2, "b") = ComboBox1
s2.Cells(sonsatir2, "c") = TextBox1
s2.Cells(sonsatir2, "d") = TextBox2
s2.Cells(sonsatir2, "e") = TextBox16

s2.Cells(sonsatir2, "f") = TextBox4
s2.Cells(sonsatir2, "g") = Format(TextBox5, "dd.mm.yyyy")
s2.Cells(sonsatir2, "h") = Format(TextBox6, "dd.mm.yyyy")
s2.Cells(sonsatir2, "ı") = TextBox7
s2.Cells(sonsatir2, "J") = TextBox8
s2.Cells(sonsatir2, "K") = TextBox9
s2.Cells(sonsatir2, "L") = TextBox10
s2.Cells(sonsatir2, "M") = TextBox11
s2.Cells(sonsatir2, "N") = TextBox12
s2.Cells(sonsatir2, "O") = TextBox13

End Sub

Private Sub CommandButton3_Click()
Unload Me
End Sub
 

Ekli dosyalar

TURKOLOG

Altın Üye
Katılım
13 Kasım 2008
Mesajlar
744
Excel Vers. ve Dili
2016 64 TR
Altın Üyelik Bitiş Tarihi
29-10-2026
Rica ederim, güle güle kullanın, butonla kullanmanız gerekirse; bildirirseniz ona göre düzenlemeye çalışırız
Aslında üzerinde çalışıyorum yardimizniza ihtiyacım olabilir. Evdeki ofis 2016 65 bit sürümde çalışan kodlar ofisimdeki 64 bit 2016 da calismiuorçalışmıyor ilginç. Ofisteki bilgisayar internete bağlanmadığı için ofis 2016 64 bit ilk hazırlandığı şekilde güncelleme hiç bir şekilde almadığı için diye düşünüyorum.

İlginize çok teşekkür ederim.
 

YUSUF44

Destek Ekibi
Destek Ekibi
Katılım
4 Ocak 2006
Mesajlar
12,084
Excel Vers. ve Dili
İş : Ofis 365 - Türkçe
Ev: Ofis 365 - Türkçe
Bendeki bir dosyada kullandığım formül de aşağıda;

(A1 hücresine yazılmış bir TCNO'yu doğrular, ama böyle bir TCNO'lu gerçekten bir şahıs var mı ? Orası anlaşılmaz...)

Kod:
=IF(RIGHT(A1;1)+0=MOD(SUMPRODUCT(1*MID(A1;ROW(INDIRECT("1:10"));1));10);"Tamam";"Hatalı TC No")
.
Anladığım kadarıyla bu formül sadece son rakamın doğruluğunu kontrol ediyor. Ancak TC numarasında 10. Hane de belirli bir kuralla oluşturuluyor. Dolayısıyla 10. Hanenin de doğruluğunun kontrol edilmesi gerekir.
 

assenucler

Altın Üye
Katılım
19 Ağustos 2004
Mesajlar
3,521
Excel Vers. ve Dili
Ofis 365 TR 64 Windows 11 Home Single Language x64 TR
Altın Üyelik Bitiş Tarihi
29-05-2025
Sayın TURKOLOG,

Paylaşımınız size, emeği geçen ve katkıda bulunanlara teşekkür ederim.
 
Üst