DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub Sil()
For X = Cells(2, Columns.Count).End(1).Column To 2 Step -2
Baslik = Cells(1, X - 1)
Cells(1, X - 1).EntireColumn.Delete
Cells(1, X - 1) = Baslik
Next
MsgBox "İşleminiz tamamlanmıştır.", vbInformation
End Sub
Sub Sil()
Sutun = 3
If Range("A2") = "ADI SOYADI" Then
Sutun = 2
Columns("B:B").Insert Shift:=xlToRight
Application.DisplayAlerts = False
Columns("A:A").TextToColumns Destination:=Range("A1"), DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 1), Array(7, 1)), TrailingMinusNumbers:=True
Application.DisplayAlerts = True
Range("A2:B2") = Array("SİCİL NO", "ADI SOYADI")
End If
For X = Cells(2, Columns.Count).End(1).Column To Sutun Step -2
Baslik = Cells(1, X - 1)
If Cells(2, X - 1) = "PUAN" Then
Cells(1, X - 1).EntireColumn.Delete
Cells(1, X - 1) = Baslik
End If
Next
ActiveSheet.UsedRange.Borders.LineStyle = 1
Cells.EntireColumn.AutoFit
MsgBox "İşleminiz tamamlanmıştır.", vbInformation
End Sub
SüperDeneyiniz.
Kod:Sub Sil() Sutun = 3 If Range("A2") = "ADI SOYADI" Then Sutun = 2 Columns("B:B").Insert Shift:=xlToRight Application.DisplayAlerts = False Columns("A:A").TextToColumns Destination:=Range("A1"), DataType:=xlFixedWidth, _ FieldInfo:=Array(Array(0, 1), Array(7, 1)), TrailingMinusNumbers:=True Application.DisplayAlerts = True Range("A2:B2") = Array("SİCİL NO", "ADI SOYADI") End If For X = Cells(2, Columns.Count).End(1).Column To Sutun Step -2 Baslik = Cells(1, X - 1) If Cells(2, X - 1) = "PUAN" Then Cells(1, X - 1).EntireColumn.Delete Cells(1, X - 1) = Baslik End If Next ActiveSheet.UsedRange.Borders.LineStyle = 1 Cells.EntireColumn.AutoFit MsgBox "İşleminiz tamamlanmıştır.", vbInformation End Sub