Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Move cells
Selection.offset(0,-1).Resize(,1).Delete Shift:=xltoleft
selection.offset(0,-1).Select may or may not be useful -- Regards, Tom Ogilvy "Wild Bill" wrote in message ... Richard that is superbly succinct - too bad it doesn't reselect the way he wants it to (I tried to adapt it but couldn't). Also you probably meant to use -1 instead of 1. On Wed, 27 Aug 2003 04:06:41 -0700, "Richard Daniels" wrote: Sub moveCells() Selection.Cut Destination:=Range(Selection.Offset(0, 1).Address) End Sub -----Original Message----- I need a quick macro that will take the current selection of cells and move them all one cell to the left, overwriting the existing cell content. I've got a huge spreadsheet (being used as a data source for a Word merge) that needs this for lots of the records (59,000 of them!), and it's taking a long time grabbing a selection with the mouse and manually moving them across. I'd like a macro I could assign to a shortcut key and just select the required cells and hit and shortcut key for as many 'left-shifts' of the cells as I required. Could anyone help me? Thanks Steve . |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Move cells
Brilliant. At first glance my simple brain thought it would lose the
column width of the selection from the (,1) -- but of course it doesn't since it operates on the offset, not the selection itself. Shrewd. On Wed, 27 Aug 2003 08:59:10 -0400, "Tom Ogilvy" wrote: Selection.offset(0,-1).Resize(,1).Delete Shift:=xltoleft selection.offset(0,-1).Select may or may not be useful |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Move cells down | Excel Discussion (Misc queries) | |||
Can references (to cells being sorted) move with the cells? | Setting up and Configuration of Excel | |||
Sorting cells: a list behind the cells do not move with the cell | Excel Discussion (Misc queries) | |||
Move 2 cells to right | Excel Discussion (Misc queries) | |||
Move cells | Excel Programming |