Re: Selecting 2 cells together
From: Ron de Bruin (rondebruin_at_kabelfoon.nl)
Date: 09/18/04
- Next message: BHARATH RAJAMANI: "Re: WORKBOOKS.OPEN (URL) - How to trap a connection-lost/ timeout"
- Previous message: *** Kusleika: "Re: Querytable naming cells"
- In reply to: Brian: "Selecting 2 cells together"
- Next in thread: Brian: "Re: Selecting 2 cells together"
- Reply: Brian: "Re: Selecting 2 cells together"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 18 Sep 2004 15:14:02 +0200
Hi Brian
Look in the VBA help for Resize
-- Regards Ron de Bruin http://www.rondebruin.nl "Brian" <bxxcfilm@nildram.co.uk> wrote in message news:%23%23JTweXnEHA.324@TK2MSFTNGP11.phx.gbl... >I am trying to do the following in a macro: > > 1. For all occupied cells in one column > 2. Jump down to the next occupied cell > 3. Select that cell AND the one to the left of it > 4. Cut > 5. Move the selection one cell to the left. > 6. Paste. > > The following code does all of that except for step 3. It seems such a > simple thing, but I can't find it in the Google archive. > > Can someone help? > > Sub Line_up_cols() > ' > ' Line_up_cols Macro > ' Macro recorded 09/02/2004 by bc > ' > ' Keyboard Shortcut: Ctrl+Shift+L > ' > Dim myRange As Range > Selection.End(xlDown).Select > Selection.Cut > Selection.Offset(0, -1).Select > Active***.Paste > End Sub > > >
- Next message: BHARATH RAJAMANI: "Re: WORKBOOKS.OPEN (URL) - How to trap a connection-lost/ timeout"
- Previous message: *** Kusleika: "Re: Querytable naming cells"
- In reply to: Brian: "Selecting 2 cells together"
- Next in thread: Brian: "Re: Selecting 2 cells together"
- Reply: Brian: "Re: Selecting 2 cells together"
- Messages sorted by: [ date ] [ thread ]