I have vba macro to delete a selection of cells. Its shifting the cells up automatically after deleting them. I don't want the cells to be shifted up, as I have a chart below the cells and everything gets disturbed if they are shifted.
Here is the code I am using to delete cells
ActiveSheet.UsedRange.Select
ActiveSheet.Range("C2:H8").Select
Selection.Delete
Let me know how can I delete them without shifting up.
You could use
ActiveSheet.Range("C2:H8").ClearContents
that'll empty the content without shifting anything.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With