ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Move text after delete (https://www.excelbanter.com/excel-programming/318547-move-text-after-delete.html)

gregork

Move text after delete
 
I have a range on my worksheet (B7:K23) that I add and remove data from via
a user form. When I clear contents of data how can I get all data below the
original data to move up a row so as I don't end up with empty cells.

Cheers
Greg



Sharad

Move text after delete
 

You can use
Range("B7:K23").Delete Shift:=xlShiftUp

Sharad

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

gregork

Move text after delete
 
Thanks for the reply. I don't want to delete any rows. I just want any text
underneath the cells that I have cleared the contents of to move up 1 row.

Cheers
Greg

"Sharad" wrote in message
...

You can use
Range("B7:K23").Delete Shift:=xlShiftUp

Sharad

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!




Sharad

Move text after delete
 
The code I gave, does not delete any rows.
Unless you have defined names to those cells the effect is exactly same
as clearing the cell and manually doing cut-paste to move up.

Sharad



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


All times are GMT +1. The time now is 02:32 PM.

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