How about
VBA Code:
Sub Coyotex()
Range("B1", Range("B" & Rows.Count).End(xlUp)).SpecialCells(xlBlanks).EntireRow.Delete
End Sub
This sub is absolutely amazing. I can't believe Excel is so powerful and I imagine I'm barely scratching the surface. This code works but I can't get the sort portion right. Here is what I have
Sub Macro10()
'
' Macro10 Macro
'
'
ActiveWorkbook.Worksheets("Sheet1 (17)").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Sheet1 (17)").Sort.SortFields.Add2 Key:=ActiveCell _
.Offset(0, 3).Range("A1:A147"), SortOn:=xlSortOnValues, Order:=xlAscending, _
DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("Sheet1 (17)").Sort.SortFields.Add2 Key:=ActiveCell _
.Range("A1:A147"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption _
:=xlSortNormal
With ActiveWorkbook.Worksheets("Sheet1 (17)").Sort
.SetRange ActiveCell.Offset(-1, 0).Range("A1:G148")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
I'm trying to make my next command on the chain to sort by column D and then Column A. My code is not working though.