kathyb0527
09-03-2008, 10:27 AM
I have written the following code. I'm sure there is a more efficient way to do this so the code doesn't have to perform 3 times. Is this a case to use an array or should renaming the range work?
Set rBlanks = wbTarget.ActiveSheet.Range("D2:D" & Range("A" & Rows.Count).End(xlDown).Row)
rBlanks.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Set rBlanks = wbTarget.ActiveSheet.Range("H2:H" & Range("A" & Rows.Count).End(xlDown).Row)
rBlanks.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Set rBlanks = wbTarget.ActiveSheet.Range("i2:i" & Range("A" & Rows.Count).End(xlDown).Row)
rBlanks.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Thanks for your help once again!
Set rBlanks = wbTarget.ActiveSheet.Range("D2:D" & Range("A" & Rows.Count).End(xlDown).Row)
rBlanks.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Set rBlanks = wbTarget.ActiveSheet.Range("H2:H" & Range("A" & Rows.Count).End(xlDown).Row)
rBlanks.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Set rBlanks = wbTarget.ActiveSheet.Range("i2:i" & Range("A" & Rows.Count).End(xlDown).Row)
rBlanks.SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Thanks for your help once again!