Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Various ways and inconsistencies of deleting cells in sheets
I have found inconsistencies in how one deletes all cells in a sheet.
..UsedRange.delete cells.delete but once you reset lastrow and lastcolumn, you still find "blank" active cells (not all the time but occasionaly enough that i can screw up you code). The one which seems to be the most reliable is the following: cells.EntireRow.Delete cells.EntireColumn.Delete I've googled around but have not found any good explanation. What would a programmer use (I am not a programmer but I am trying to emulate my coding to one)? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Various ways and inconsistencies of deleting cells in sheets
On Thursday, July 26, 2012 9:58:46 PM UTC-4, wrote:
I have found inconsistencies in how one deletes all cells in a sheet. .UsedRange.delete cells.delete but once you reset lastrow and lastcolumn, you still find "blank" active cells (not all the time but occasionaly enough that i can screw up you code). The one which seems to be the most reliable is the following: cells.EntireRow.Delete cells.EntireColumn.Delete I've googled around but have not found any good explanation. What would a programmer use (I am not a programmer but I am trying to emulate my coding to one)? Thanks I got this from the Macro Recorder: Cells.Select Selection.Delete Shift:=xlUp M |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Various ways and inconsistencies of deleting cells in sheets
Thanks. I was aiming at a cleaner code.
Cells.delete or activehseet.usedrange.delete seems to occasionally fail. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
converting ways of referencing cells | Excel Programming | |||
converting ways of referencing cells | Excel Programming | |||
Ways to parse cells in mulitple selected locations | Excel Programming | |||
Are there ways to protect multiple sheets at once? | New Users to Excel | |||
Transposing cells & deleting sheets | Excel Programming |