Hi helpers
I run the macro below in the attached xls for sheet1 but always fail. I know that the code line below [bottomB = Sheets("sheet1").Range("B" & Rows.Count).End(xlUp).Row] that has a problem when debug but I dont know how to fix it to give the same results of the same entire macro I wan. If I run the same macro with over 3000 row data (in sheet2) it works so I assume that this fail in many data row.
Can anyone help in this???
Thanks in advance
Code
Sub test()
Columns("A:A").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.EntireRow.Delete
Columns("A:A").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Dim bottomB As Integer
Dim x As Integer
bottomB = Sheets("sheet1").Range("B" & Rows.Count).End(xlUp).Row
Dim c As Range
For Each c In Sheets("sheet1").Range("B1:B" & bottomB)
If c.Value Like "*January*" Or c.Value Like "*February*" Or c.Value Like "*March*" Or c.Value Like "*April*" Or c.Value Like "*May*" Or c.Value Like "*June*" Or c.Value Like "*July*" Or c.Value Like "*August*" Or c.Value Like "*September*" Or c.Value Like "*October*" Or c.Value Like "*November*" Or c.Value Like "*December*" Then
c.Copy Worksheets("sheet1").Range("A" & c.Row)
End If
Next c
End Sub
Display More