- Katılım
- 26 Nisan 2019
- Mesajlar
- 161
- Excel Vers. ve Dili
- Excel 2019 64 bit Tr
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub askm()
Dim s1 As Worksheet, s2 As Worksheet
Set s1 = Sheets("sablon")
Set s2 = Sheets("islem")
a = 1
Application.ScreenUpdating = False
For i = 1 To s1.Range("A" & Rows.Count).End(3).Row
s = 3
For x = 3 To 18
If s1.Cells(i, x) <> Empty Then
s2.Cells(a, s) = s1.Cells(i, x)
s = s + 1
End If
Next x
a = a + 2
Next i
s2.Columns("C:L").EntireColumn.AutoFit
Application.ScreenUpdating = True
MsgBox "İşlem tamam...", vbInformation, "ASKM"
End Sub
Aşağıdaki kodları kullanabilirsiniz.
Kod:Sub askm() Dim s1 As Worksheet, s2 As Worksheet Set s1 = Sheets("sablon") Set s2 = Sheets("islem") a = 1 Application.ScreenUpdating = False For i = 1 To s1.Range("A" & Rows.Count).End(3).Row s = 3 For x = 3 To 18 If s1.Cells(i, x) <> Empty Then s2.Cells(a, s) = s1.Cells(i, x) s = s + 1 End If Next x a = a + 2 Next i s2.Columns("C:L").EntireColumn.AutoFit Application.ScreenUpdating = True MsgBox "İşlem tamam...", vbInformation, "ASKM" End Sub
Sub askm()
Dim s1 As Worksheet, s2 As Worksheet
Set s1 = Sheets("sablon")
Set s2 = Sheets("islem")
a = 1
Application.ScreenUpdating = False
For i = 1 To s1.Range("A" & Rows.Count).End(3).Row
s = 3
For x = 3 To 18
If s1.Cells(i, x) <> Empty Then
If Len(Trim(s1.Cells(i, x))) > 1 Then
s2.Cells(a, s) = Left(s1.Cells(i, x), 1)
s = s + 1
s2.Cells(a, s) = Right(s1.Cells(i, x), 1)
Else
s2.Cells(a, s) = s1.Cells(i, x)
End If
s = s + 1
End If
Next x
a = a + 2
Next i
s2.Columns("C:L").EntireColumn.AutoFit
Application.ScreenUpdating = True
MsgBox "İşlem tamam...", vbInformation, "ASKM"
End Sub
emekleriniz için çok teşekkürler.Aşağıdaki şekilde deneyin.
Kod:Sub askm() Dim s1 As Worksheet, s2 As Worksheet Set s1 = Sheets("sablon") Set s2 = Sheets("islem") a = 1 Application.ScreenUpdating = False For i = 1 To s1.Range("A" & Rows.Count).End(3).Row s = 3 For x = 3 To 18 If s1.Cells(i, x) <> Empty Then If Len(Trim(s1.Cells(i, x))) > 1 Then s2.Cells(a, s) = Left(s1.Cells(i, x), 1) s = s + 1 s2.Cells(a, s) = Right(s1.Cells(i, x), 1) Else s2.Cells(a, s) = s1.Cells(i, x) End If s = s + 1 End If Next x a = a + 2 Next i s2.Columns("C:L").EntireColumn.AutoFit Application.ScreenUpdating = True MsgBox "İşlem tamam...", vbInformation, "ASKM" End Sub