View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Steve Yandl Steve Yandl is offline
external usenet poster
 
Posts: 284
Default Move cell contents along using vba?

I think this might do what you want. The subroutine needs to be placed in
the worksheet rather than a module or the workbook.

_____________________________

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim rngTemp As Range
Dim rngTempA As Range
If Target.Column = 3 And Not Target.Value = "" Then
Application.EnableEvents = False
Set rngTemp = Cells(Target.Row, 256).End(xlToLeft)
Set rngTempA = Range(Target.Address & ":" & rngTemp.Address)
rngTempA.Cut Destination:=Target.Offset(0, 1)
Application.EnableEvents = True
End If
End Sub

_____________________________

Steve




"Jock" wrote in message
...
Hi,
I'm going to create a spreadsheet to monitor about 20 projects. Very
simple
stuff but what I'd like to implement is when a cell in column C gets focus
to
edit, all contents of that cell automatically move one cell to the right
(to
D). Should that cell in D have contents, then it will also move one cell
to
its right. And so on and so forth. The end result would be a sheet with
the
most up to date info against the projects and the user could scroll right
to
see a 'history' of amendments.
Any thoughts?
Thanks.
--
Traa Dy Liooar

Jock