![]() |
To Delete the specific rows when blank is found on column A
Hi everyone,
Yesterday, Norman gave mi the solution to my subject stated the above. Columns("A:A").SpecialCells(xlBlanks).EntireRow.De lete The writings stated the above works... but I am facing another problem which is if when worksheet happens to be empty with no datas, so how am I gonna continue from there?? cos the writings above only works if there is datas in the worksheet. AJ |
To Delete the specific rows when blank is found on column A
Hi AJ,
Sub Tester07() On Error Resume Next Columns("A:A").SpecialCells(xlBlanks).EntireRow.De lete On Error GoTo 0 End Sub -- --- Regards, Norman "ddiicc" wrote in message ... Hi everyone, Yesterday, Norman gave mi the solution to my subject stated the above. Columns("A:A").SpecialCells(xlBlanks).EntireRow.De lete The writings stated the above works... but I am facing another problem which is if when worksheet happens to be empty with no datas, so how am I gonna continue from there?? cos the writings above only works if there is datas in the worksheet. AJ |
To Delete the specific rows when blank is found on column A
Hi AJ,
Yesterday, Norman gave mi the solution to my subject stated the above. Columns("A:A").SpecialCells(xlBlanks).EntireRow.De lete In a follow up reply, I alluded to the 8192 non-contiguous cells problem associated with the SpecialCells method. I should also have mentioned that, at the other end of the spectrum, the SpecialCells method will fail if no cells are found - as you have now discovred. The fault is mine and I apologise: use of the SpecialCells method should, in my opinion, always include an error handler to catch (at leat) the latter situation. --- Regards, Norman "Norman Jones" wrote in message ... Hi AJ, Sub Tester07() On Error Resume Next Columns("A:A").SpecialCells(xlBlanks).EntireRow.De lete On Error GoTo 0 End Sub -- --- Regards, Norman "ddiicc" wrote in message ... Hi everyone, Yesterday, Norman gave mi the solution to my subject stated the above. Columns("A:A").SpecialCells(xlBlanks).EntireRow.De lete The writings stated the above works... but I am facing another problem which is if when worksheet happens to be empty with no datas, so how am I gonna continue from there?? cos the writings above only works if there is datas in the worksheet. AJ |
To Delete the specific rows when blank is found on column A
Norman,
Many thanks to you. :) "Norman Jones" wrote: Hi AJ, Sub Tester07() On Error Resume Next Columns("A:A").SpecialCells(xlBlanks).EntireRow.De lete On Error GoTo 0 End Sub -- --- Regards, Norman "ddiicc" wrote in message ... Hi everyone, Yesterday, Norman gave mi the solution to my subject stated the above. Columns("A:A").SpecialCells(xlBlanks).EntireRow.De lete The writings stated the above works... but I am facing another problem which is if when worksheet happens to be empty with no datas, so how am I gonna continue from there?? cos the writings above only works if there is datas in the worksheet. AJ |
All times are GMT +1. The time now is 07:35 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com