Re: Transpose or Macro?
- From: joel <joel.416fgk@xxxxxxxxxxxxxxx>
- Date: Thu, 5 Nov 2009 11:54:22 +0000
Sub FixDates()
With Sheets("Sheet1")
RowCount = 1
Do While .Range("A" & RowCount) <> ""
LastRow = Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Row
NewRow = LastRow + 1
MyDate = .Range("A" & RowCount)
Set LastCol = .Cells(RowCount, Columns.Count).End(xlToLeft)
Set CopyRange = .Range(.Range("B" & RowCount), LastCol)
CopyRange.Copy
Sheets("Sheet2").Range("B" & NewRow).PasteSpecial
Transpose:=True
LastRow = Sheets("Sheet2").Range("B" & Rows.Count).End(xlUp).Row
Sheets("Sheet2").Range("A" & NewRow & ":A" & LastRow) = MyDate
Sheets("Sheet2").Range("A" & NewRow & ":A" & LastRow) _
NumberFormat = "DD-MMM"
RowCount = RowCount + 1
Loop
End With
End Sub
--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=151281
[url="http://www.thecodecage.com"]Microsoft Office Help[/url]
.
- References:
- Transpose or Macro?
- From: Buyone
- RE: Transpose or Macro?
- From: Ms-Exl-Learner
- RE: Transpose or Macro?
- From: Buyone
- Transpose or Macro?
- Prev by Date: Re: hyperlink to cell based on formula results
- Next by Date: Conditional Format Range of Cells
- Previous by thread: RE: Transpose or Macro?
- Next by thread: RE: Transpose or Macro?
- Index(es):
Relevant Pages
|