#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Move cells down GARY Excel Discussion (Misc queries) 4 June 10th 11 02:59 PM
Can references (to cells being sorted) move with the cells? Zack Setting up and Configuration of Excel 1 January 16th 08 01:50 PM
Sorting cells: a list behind the cells do not move with the cell Ross M Excel Discussion (Misc queries) 2 September 21st 06 12:14 PM
Move 2 cells to right Pasmatos Excel Discussion (Misc queries) 4 November 10th 05 09:23 AM
Move cells Wild Bill[_2_] Excel Programming 0 August 27th 03 11:46 AM


All times are GMT +1. The time now is 06:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"