• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

It is Necessary to Shifting excel Up,down,Left,Right,after remove Row Or Column?

Dear Sirs,

It is necessary to shifting range after delete rows or columns in excel through VBA?
because if you delete rows or columns in excel , excel automatically shift ranges to left or up . Excel's this action is reliable for Auto-reset used range?

Some times seen that used range don't reset without explicitly forced as shifting ranges
after delete or remove rows or columns so what should be next action after delete rows or columns?

another point for cells, what is the default behaviour of shifting after delete or remove cell from the range? if, cells need to delete from range, what is necessary as next action?

Please help as spread universal guide on shifting.

Regards,
Chirag Raval
 
If you delete a row or column, there is only one possible way for other cells to shift, so no real need to specify it. In any other case you should specify - relying on defaults is just bad practice generally.
 
Hi !
Some times seen that used range don't reset
Yes it can occurs, disappears after saving and closing workbook …

A tip on VBA side only if the worsheet is active just add this codeline :
ActiveSheet.UsedRange

Or just using usual workarounds like CurrentRegion

Another tip to avoid deleting rows within a loop
is to sort and Clear at once, a faster way …
 
Back
Top