Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I want a macro to start at a certain point, move down to the end of the text and delete the empty space between it and the next populated cells. Not delete rows, rahter delete cells, shifting up. I've written: Sub testdelete() Range("C5").Select Selection.End(xlDown).Select ActiveCell.Offset(1, 0).Select Range(Selection, Selection.End(xlDown)).Select ActiveCell.Offset(-1, 0).Select ActiveCell.Offset(0, 6).Select Selection.Delete Shift:=xlUp Range("C11").Select End Sub This doesn't work because the .select sets up a new selection rather than manipulating the old one. I appreciate this is rookie stuff, but I don't write much VBA, so I've never got very good at it. Any ideas gratefully received. Cheers. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code to Delete Range Names | Excel Programming | |||
How to Delete a Range in Closed Workbook (to Replace Delete Query) | Excel Discussion (Misc queries) | |||
Code to delete a Line in a another code | Excel Programming | |||
VBA code delete code but ask for password and unlock VBA protection | Excel Programming | |||
VBA code to delete VBA code in another Workbook | Excel Programming |