DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
[FONT="Arial Narrow"][B]Private Sub Worksheet_SelectionChange(ByVal Target As Range)[/B]
If Intersect(Target, [COLOR="Red"]Range("F1:F" & [A65536].End(3).Row)[/COLOR]) Is Nothing Then Exit Sub
If Cells(Target.Row, 1) = "" Then Exit Sub
Call Parca_Al
[B]End Sub
Sub Parca_Al()[/B]
On Error GoTo 100
10: ilk = Application.InputBox("Başlangıç sayısı giriniz.", "Sayı", "6", Type:=1)
If ilk > Len(Cells(ActiveCell.Row, ActiveCell.Column - 5)) Then
MsgBox "Hedef hücrenin uzunluğundan daha küçük bir sayı yazılmalıdır...": GoTo 10
End If
20: sayı = Application.InputBox("Karakter sayısı giriniz.", "Sayı", 1, Type:=1)
If sayı < 0 Then GoTo 20
If ActiveCell.Column - 5 < 0 Then
MsgBox "Formül uygulaması için F sütunundan bir hücre seçilmiş olmalıdır."
Exit Sub
End If
If ilk = False Or sayı = False Then Exit Sub
[COLOR="red"]With Range("F1:F" & [A65536].End(3).Row)
.FormulaR1C1 = "=MID(RC[-5]," & ilk & "," & sayı & ")"
.Value = .Value
End With
[/COLOR]
100
[B]End Sub[/B][/FONT]