DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub DeleteEmptyColumns()
'Updateby20140317
Dim rng As Range
Dim InputRng As Range
xTitleId = "KutoolsforExcel"
Set InputRng = Application.Selection
Set InputRng = Application.InputBox("Range :", xTitleId, InputRng.Address, Type:=8)
Application.ScreenUpdating = False
For i = InputRng.Columns.Count To 1 Step -1
Set rng = InputRng.Cells(1, i).EntireColumn
If Application.WorksheetFunction.CountA(rng) = 0 Then
rng.Delete
End If
Next
Application.ScreenUpdating = True
End Sub
Sub Bos_Satir_ve_Sutunlari_Sil()
Application.ScreenUpdating = False
For X = 255 To 2 Step -1
Cells.Replace WorksheetFunction.Rept("-", X), "", xlWhole
Cells.Replace WorksheetFunction.Rept("…", X), "", xlWhole
Cells.Replace WorksheetFunction.Rept(".", X), "", xlWhole
Cells.Replace "……..", "", xlWhole
Next
For X = 255 To 1 Step -1
Cells.Replace WorksheetFunction.Rept(Chr(32), X), "", xlWhole
Next
For X = Cells(Rows.Count, 1).End(3).Row To 1 Step -1
If Len(Cells(X, 1)) = 0 Then Rows(X).Delete
Next
For X = Cells(1, Columns.Count).End(1).Column To 1 Step -1
Toplam = Evaluate("=SUM(LEN(" & Columns(X).Address & "))")
If Toplam = 0 Then
Columns(X).Delete
End If
Next
Cells.EntireColumn.AutoFit
Application.ScreenUpdating = True
MsgBox "İşleminiz tamamlanmıştır.", vbInformation
End Sub
Sub DeleteEmptyColumnsAndRows()
Application.ScreenUpdating = False
For Each huc In ActiveSheet.UsedRange
huc.Value = Trim(huc.Value)
Next huc
For i = [IV2].End(xlToLeft).Column To 1 Step -1
If Cells(2, i) = " " Or Cells(2, i) = Empty Then
Columns(i).Delete
End If
Next
For i = [A65536].End(3).Row To 1 Step -1
If Cells(i, 1) Like "-*" Or Cells(i, 1) = Empty Then
Rows(i).Delete
End If
Next
Columns.EntireColumn.AutoFit
Application.ScreenUpdating = True
End Sub
Sayın veyselemre, verdiğiniz kod ile ilgili bir şey sormak isterim.[/SIZE]Kod:[SIZE="2"]Sub DeleteEmptyColumnsAndRows() Application.ScreenUpdating = False For Each huc In ActiveSheet.UsedRange huc.Value = Trim(huc.Value) Next huc For i = [IV2].End(xlToLeft).Column To 1 Step -1 If Cells(2, i) = " " Or Cells(2, i) = Empty Then Columns(i).Delete End If Next ............. End Sub
Merhaba Ömer Bey,Sayın veyselemre, verdiğiniz kod ile ilgili bir şey sormak isterim.