Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro needed


I am wanting a macro to move cut cells from a column and paste to
rows:-

Currently i have 15 cells in a column, and am needing the 1st to stay
where it is, cell 2 to move to the right of cell 1, cell 3 to move 2 to
the right of cell 1, cell 4 to move 3 to the right of cell 1 etc

Any clues?

I have tried recording a macro but it always paste's upon my 1st row.

Thanks in advance

regards


keith dixon


--
keithdixon
------------------------------------------------------------------------
keithdixon's Profile: http://www.excelforum.com/member.php...o&userid=34264
View this thread: http://www.excelforum.com/showthread...hreadid=540214

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default Macro needed

Try this (not fully tested)

HTH
--
AP

'----------------
Sub transpose()
Dim rcell As Range
Dim rPivot As Range
' Validate selection
If Selection.Columns.Count < 1 _
Or Selection.Areas.Count < 1 Then
MsgBox "Select one column only"
Exit Sub
End If
' Initialize pivot cell
Set rPivot = Selection.Cells(1)
' Transpose
For Each rcell In Selection
rPivot.Offset(0, rcell.Row - rPivot.Row) = rcell.Value
' Clear old value
If rcell.Row < rPivot.Row Then rcell.ClearContents
Next rcell
End Sub
'------------------------

"keithdixon" a
écrit dans le message de news:
...

I am wanting a macro to move cut cells from a column and paste to
rows:-

Currently i have 15 cells in a column, and am needing the 1st to stay
where it is, cell 2 to move to the right of cell 1, cell 3 to move 2 to
the right of cell 1, cell 4 to move 3 to the right of cell 1 etc

Any clues?

I have tried recording a macro but it always paste's upon my 1st row.

Thanks in advance

regards


keith dixon


--
keithdixon
------------------------------------------------------------------------
keithdixon's Profile:
http://www.excelforum.com/member.php...o&userid=34264
View this thread: http://www.excelforum.com/showthread...hreadid=540214



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
macro help needed Carolina Girl[_2_] Excel Worksheet Functions 1 March 24th 09 04:50 PM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
Macro needed to set macro security in Excel to minimum Carl Excel Programming 3 March 18th 06 03:36 PM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 0 June 10th 05 03:38 PM


All times are GMT +1. The time now is 05:00 PM.

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

About Us

"It's about Microsoft Excel"