ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Conditional/selective deleting (https://www.excelbanter.com/excel-programming/277273-re-conditional-selective-deleting.html)

Tom Ogilvy

Conditional/selective deleting
 
Dim rng as Range, cell as Range
set rng = Range(Range("C1"),Cells(rows.count,3).End(xlup))
for each cell in rng
if application.CountA(cell.Resize(1,18)) = 0 then
cells(cell.row,1).Resize(1,2).ClearContents
End if
Next

May do what you want.

--
Regards,
Tom Ogilvy




"Martyn" wrote in message
...
How would i go about deleting any data in rows A:* AND B:*
IF C*:U* are empty?
Many thanks





All times are GMT +1. The time now is 12:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com