close

What I have is

Company 3COM
Category Communication Products
URLURL: N/A
Listing Electrical

Company 3M
Category Tape, Splice Kits
URL www.3m.com/
Listing Electrical

Company ADVANCE
Category Sign Ballast
URL www.advanceelectric.com/
Listing Electrical

What I need to get is
Company Category URL
Listing
Advance Sign Ballast www.advanceelectric.com
Electrical
3M Tape, Slices www.3m.com
Electrical
3com Communication Products N/A
Electrical

Thank you for any help,

Kevin

sorry, above formatting got messed up

company Category URL Listing
3Com Comm. Product N/A Electrical
3M Tape, Slice kits www.3m.com Electrical

quot;Savagequot; wrote:

gt; What I have is
gt;
gt; Company 3COM
gt; Category Communication Products
gt; URLURL: N/A
gt; Listing Electrical
gt;
gt; Company 3M
gt; Category Tape, Splice Kits
gt; URL www.3m.com/
gt; Listing Electrical
gt;
gt; Company ADVANCE
gt; Category Sign Ballast
gt; URL www.advanceelectric.com/
gt; Listing Electrical
gt;
gt; What I need to get is
gt; Company Category URL
gt; Listing
gt; Advance Sign Ballast www.advanceelectric.com
gt; Electrical
gt; 3M Tape, Slices www.3m.com
gt; Electrical
gt; 3com Communication Products N/A
gt; Electrical
gt;
gt; Thank you for any help,
gt;
gt; Kevin

Hi,

Try..

Sub transpose()
Dim lastrow As Long, r As Long
Dim ws1 As Worksheet, ws2 As Worksheet
Set ws1 = Worksheets(quot;sheet1quot;)
Set ws2 = Worksheets(quot;sheet2quot;)
r = 2 'lt;== assumes data starts in row 2 ....change
With ws1
lastrow = .Cells(Rows.Count, quot;Aquot;).End(xlUp).Row
..Cells(r, quot;aquot;).Resize(4, 1).Copy
ws2.Cells(1, quot;Aquot;).Resize(1, 4).PasteSpecial Paste:=xlPasteAll,
Operation:=xlNone, SkipBlanks:= _
False, transpose:=True
Do
..Cells(r, quot;Bquot;).Resize(4, 1).Copy
ws2.Cells(Rows.Count, quot;Aquot;).End(xlUp)(2).Resize(1, 4).PasteSpecial
Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, transpose:=True
r = r 5
Loop Until r gt; lastrow
End With
End Sub

HTH

quot;Savagequot; wrote:

gt; sorry, above formatting got messed up
gt;
gt; company Category URL Listing
gt; 3Com Comm. Product N/A Electrical
gt; 3M Tape, Slice kits www.3m.com Electrical
gt;
gt; quot;Savagequot; wrote:
gt;
gt; gt; What I have is
gt; gt;
gt; gt; Company 3COM
gt; gt; Category Communication Products
gt; gt; URLURL: N/A
gt; gt; Listing Electrical
gt; gt;
gt; gt; Company 3M
gt; gt; Category Tape, Splice Kits
gt; gt; URL www.3m.com/
gt; gt; Listing Electrical
gt; gt;
gt; gt; Company ADVANCE
gt; gt; Category Sign Ballast
gt; gt; URL www.advanceelectric.com/
gt; gt; Listing Electrical
gt; gt;
gt; gt; What I need to get is
gt; gt; Company Category URL
gt; gt; Listing
gt; gt; Advance Sign Ballast www.advanceelectric.com
gt; gt; Electrical
gt; gt; 3M Tape, Slices www.3m.com
gt; gt; Electrical
gt; gt; 3com Communication Products N/A
gt; gt; Electrical
gt; gt;
gt; gt; Thank you for any help,
gt; gt;
gt; gt; Kevin

I am not sure what you mean?

quot;Toppersquot; wrote:

gt; Hi,
gt;
gt; Try..
gt;
gt; Sub transpose()
gt; Dim lastrow As Long, r As Long
gt; Dim ws1 As Worksheet, ws2 As Worksheet
gt; Set ws1 = Worksheets(quot;sheet1quot;)
gt; Set ws2 = Worksheets(quot;sheet2quot;)
gt; r = 2 'lt;== assumes data starts in row 2 ....change
gt; With ws1
gt; lastrow = .Cells(Rows.Count, quot;Aquot;).End(xlUp).Row
gt; .Cells(r, quot;aquot;).Resize(4, 1).Copy
gt; ws2.Cells(1, quot;Aquot;).Resize(1, 4).PasteSpecial Paste:=xlPasteAll,
gt; Operation:=xlNone, SkipBlanks:= _
gt; False, transpose:=True
gt; Do
gt; .Cells(r, quot;Bquot;).Resize(4, 1).Copy
gt; ws2.Cells(Rows.Count, quot;Aquot;).End(xlUp)(2).Resize(1, 4).PasteSpecial
gt; Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
gt; False, transpose:=True
gt; r = r 5
gt; Loop Until r gt; lastrow
gt; End With
gt; End Sub
gt;
gt; HTH
gt;
gt; quot;Savagequot; wrote:
gt;
gt; gt; sorry, above formatting got messed up
gt; gt;
gt; gt; company Category URL Listing
gt; gt; 3Com Comm. Product N/A Electrical
gt; gt; 3M Tape, Slice kits www.3m.com Electrical
gt; gt;
gt; gt; quot;Savagequot; wrote:
gt; gt;
gt; gt; gt; What I have is
gt; gt; gt;
gt; gt; gt; Company 3COM
gt; gt; gt; Category Communication Products
gt; gt; gt; URLURL: N/A
gt; gt; gt; Listing Electrical
gt; gt; gt;
gt; gt; gt; Company 3M
gt; gt; gt; Category Tape, Splice Kits
gt; gt; gt; URL www.3m.com/
gt; gt; gt; Listing Electrical
gt; gt; gt;
gt; gt; gt; Company ADVANCE
gt; gt; gt; Category Sign Ballast
gt; gt; gt; URL www.advanceelectric.com/
gt; gt; gt; Listing Electrical
gt; gt; gt;
gt; gt; gt; What I need to get is
gt; gt; gt; Company Category URL
gt; gt; gt; Listing
gt; gt; gt; Advance Sign Ballast www.advanceelectric.com
gt; gt; gt; Electrical
gt; gt; gt; 3M Tape, Slices www.3m.com
gt; gt; gt; Electrical
gt; gt; gt; 3com Communication Products N/A
gt; gt; gt; Electrical
gt; gt; gt;
gt; gt; gt; Thank you for any help,
gt; gt; gt;
gt; gt; gt; Kevin

This is VBA code which has to be placed in a module.

In your EXCel w/book, do ALT F11 which bring up the VB editor (VBE).

In the Project quot;boxquot; on the LH side, you should see an icon with quot;VBA
Project ( lt;booknamegt;) where lt;booknamegt; is the name of your spreadshhet. Right
click==gt;Insert=gt;Module and copy the code intpo the module.

To run the code, place the cursor in the code then click the grren arrowhead
in (normally) second toolbar.

HTH

quot;Savagequot; wrote:

gt; I am not sure what you mean?
gt;
gt; quot;Toppersquot; wrote:
gt;
gt; gt; Hi,
gt; gt;
gt; gt; Try..
gt; gt;
gt; gt; Sub transpose()
gt; gt; Dim lastrow As Long, r As Long
gt; gt; Dim ws1 As Worksheet, ws2 As Worksheet
gt; gt; Set ws1 = Worksheets(quot;sheet1quot;)
gt; gt; Set ws2 = Worksheets(quot;sheet2quot;)
gt; gt; r = 2 'lt;== assumes data starts in row 2 ....change
gt; gt; With ws1
gt; gt; lastrow = .Cells(Rows.Count, quot;Aquot;).End(xlUp).Row
gt; gt; .Cells(r, quot;aquot;).Resize(4, 1).Copy
gt; gt; ws2.Cells(1, quot;Aquot;).Resize(1, 4).PasteSpecial Paste:=xlPasteAll,
gt; gt; Operation:=xlNone, SkipBlanks:= _
gt; gt; False, transpose:=True
gt; gt; Do
gt; gt; .Cells(r, quot;Bquot;).Resize(4, 1).Copy
gt; gt; ws2.Cells(Rows.Count, quot;Aquot;).End(xlUp)(2).Resize(1, 4).PasteSpecial
gt; gt; Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
gt; gt; False, transpose:=True
gt; gt; r = r 5
gt; gt; Loop Until r gt; lastrow
gt; gt; End With
gt; gt; End Sub
gt; gt;
gt; gt; HTH
gt; gt;
gt; gt; quot;Savagequot; wrote:
gt; gt;
gt; gt; gt; sorry, above formatting got messed up
gt; gt; gt;
gt; gt; gt; company Category URL Listing
gt; gt; gt; 3Com Comm. Product N/A Electrical
gt; gt; gt; 3M Tape, Slice kits www.3m.com Electrical
gt; gt; gt;
gt; gt; gt; quot;Savagequot; wrote:
gt; gt; gt;
gt; gt; gt; gt; What I have is
gt; gt; gt; gt;
gt; gt; gt; gt; Company 3COM
gt; gt; gt; gt; Category Communication Products
gt; gt; gt; gt; URLURL: N/A
gt; gt; gt; gt; Listing Electrical
gt; gt; gt; gt;
gt; gt; gt; gt; Company 3M
gt; gt; gt; gt; Category Tape, Splice Kits
gt; gt; gt; gt; URL www.3m.com/
gt; gt; gt; gt; Listing Electrical
gt; gt; gt; gt;
gt; gt; gt; gt; Company ADVANCE
gt; gt; gt; gt; Category Sign Ballast
gt; gt; gt; gt; URL www.advanceelectric.com/
gt; gt; gt; gt; Listing Electrical
gt; gt; gt; gt;
gt; gt; gt; gt; What I need to get is
gt; gt; gt; gt; Company Category URL
gt; gt; gt; gt; Listing
gt; gt; gt; gt; Advance Sign Ballast www.advanceelectric.com
gt; gt; gt; gt; Electrical
gt; gt; gt; gt; 3M Tape, Slices www.3m.com
gt; gt; gt; gt; Electrical
gt; gt; gt; gt; 3com Communication Products N/A
gt; gt; gt; gt; Electrical
gt; gt; gt; gt;
gt; gt; gt; gt; Thank you for any help,
gt; gt; gt; gt;
gt; gt; gt; gt; Kevin

I get an error when I run the code, Compile error syntax error. It
highlights ws2.Cells(1, quot;Aquot;).Resize(1, 4).PasteSpecial Paste:=xlPasteAll,

Kevin

quot;Toppersquot; wrote:

gt; This is VBA code which has to be placed in a module.
gt;
gt; In your EXCel w/book, do ALT F11 which bring up the VB editor (VBE).
gt;
gt; In the Project quot;boxquot; on the LH side, you should see an icon with quot;VBA
gt; Project ( lt;booknamegt;) where lt;booknamegt; is the name of your spreadshhet. Right
gt; click==gt;Insert=gt;Module and copy the code intpo the module.
gt;
gt; To run the code, place the cursor in the code then click the grren arrowhead
gt; in (normally) second toolbar.
gt;
gt; HTH
gt;
gt; quot;Savagequot; wrote:
gt;
gt; gt; I am not sure what you mean?
gt; gt;
gt; gt; quot;Toppersquot; wrote:
gt; gt;
gt; gt; gt; Hi,
gt; gt; gt;
gt; gt; gt; Try..
gt; gt; gt;
gt; gt; gt; Sub transpose()
gt; gt; gt; Dim lastrow As Long, r As Long
gt; gt; gt; Dim ws1 As Worksheet, ws2 As Worksheet
gt; gt; gt; Set ws1 = Worksheets(quot;sheet1quot;)
gt; gt; gt; Set ws2 = Worksheets(quot;sheet2quot;)
gt; gt; gt; r = 2 'lt;== assumes data starts in row 2 ....change
gt; gt; gt; With ws1
gt; gt; gt; lastrow = .Cells(Rows.Count, quot;Aquot;).End(xlUp).Row
gt; gt; gt; .Cells(r, quot;aquot;).Resize(4, 1).Copy
gt; gt; gt; ws2.Cells(1, quot;Aquot;).Resize(1, 4).PasteSpecial Paste:=xlPasteAll,
gt; gt; gt; Operation:=xlNone, SkipBlanks:= _
gt; gt; gt; False, transpose:=True
gt; gt; gt; Do
gt; gt; gt; .Cells(r, quot;Bquot;).Resize(4, 1).Copy
gt; gt; gt; ws2.Cells(Rows.Count, quot;Aquot;).End(xlUp)(2).Resize(1, 4).PasteSpecial
gt; gt; gt; Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
gt; gt; gt; False, transpose:=True
gt; gt; gt; r = r 5
gt; gt; gt; Loop Until r gt; lastrow
gt; gt; gt; End With
gt; gt; gt; End Sub
gt; gt; gt;
gt; gt; gt; HTH
gt; gt; gt;
gt; gt; gt; quot;Savagequot; wrote:
gt; gt; gt;
gt; gt; gt; gt; sorry, above formatting got messed up
gt; gt; gt; gt;
gt; gt; gt; gt; company Category URL Listing
gt; gt; gt; gt; 3Com Comm. Product N/A Electrical
gt; gt; gt; gt; 3M Tape, Slice kits www.3m.com Electrical
gt; gt; gt; gt;
gt; gt; gt; gt; quot;Savagequot; wrote:
gt; gt; gt; gt;
gt; gt; gt; gt; gt; What I have is
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; Company 3COM
gt; gt; gt; gt; gt; Category Communication Products
gt; gt; gt; gt; gt; URLURL: N/A
gt; gt; gt; gt; gt; Listing Electrical
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; Company 3M
gt; gt; gt; gt; gt; Category Tape, Splice Kits
gt; gt; gt; gt; gt; URL www.3m.com/
gt; gt; gt; gt; gt; Listing Electrical
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; Company ADVANCE
gt; gt; gt; gt; gt; Category Sign Ballast
gt; gt; gt; gt; gt; URL www.advanceelectric.com/
gt; gt; gt; gt; gt; Listing Electrical
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; What I need to get is
gt; gt; gt; gt; gt; Company Category URL
gt; gt; gt; gt; gt; Listing
gt; gt; gt; gt; gt; Advance Sign Ballast www.advanceelectric.com
gt; gt; gt; gt; gt; Electrical
gt; gt; gt; gt; gt; 3M Tape, Slices www.3m.com
gt; gt; gt; gt; gt; Electrical
gt; gt; gt; gt; gt; 3com Communication Products N/A
gt; gt; gt; gt; gt; Electrical
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; Thank you for any help,
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; Kevin

This probablt due to the quot;wrap roundquot; that occurs in NG. The lines marked gt;gt;
should be one line not two. The quot;_quot; at the end of the second line is a
continuation symbol so the third line should be OK.

gt;gt;ws2.Cells(1, quot;Aquot;).Resize(1, 4).PasteSpecial Paste:=xlPasteAll,
gt;gt;Operation:=xlNone, SkipBlanks:= _
False, transpose:=Truequot;Savagequot; wrote:

gt; I get an error when I run the code, Compile error syntax error. It
gt; highlights ws2.Cells(1, quot;Aquot;).Resize(1, 4).PasteSpecial Paste:=xlPasteAll,
gt;
gt; Kevin
gt;
gt; quot;Toppersquot; wrote:
gt;
gt; gt; This is VBA code which has to be placed in a module.
gt; gt;
gt; gt; In your EXCel w/book, do ALT F11 which bring up the VB editor (VBE).
gt; gt;
gt; gt; In the Project quot;boxquot; on the LH side, you should see an icon with quot;VBA
gt; gt; Project ( lt;booknamegt;) where lt;booknamegt; is the name of your spreadshhet. Right
gt; gt; click==gt;Insert=gt;Module and copy the code intpo the module.
gt; gt;
gt; gt; To run the code, place the cursor in the code then click the grren arrowhead
gt; gt; in (normally) second toolbar.
gt; gt;
gt; gt; HTH
gt; gt;
gt; gt; quot;Savagequot; wrote:
gt; gt;
gt; gt; gt; I am not sure what you mean?
gt; gt; gt;
gt; gt; gt; quot;Toppersquot; wrote:
gt; gt; gt;
gt; gt; gt; gt; Hi,
gt; gt; gt; gt;
gt; gt; gt; gt; Try..
gt; gt; gt; gt;
gt; gt; gt; gt; Sub transpose()
gt; gt; gt; gt; Dim lastrow As Long, r As Long
gt; gt; gt; gt; Dim ws1 As Worksheet, ws2 As Worksheet
gt; gt; gt; gt; Set ws1 = Worksheets(quot;sheet1quot;)
gt; gt; gt; gt; Set ws2 = Worksheets(quot;sheet2quot;)
gt; gt; gt; gt; r = 2 'lt;== assumes data starts in row 2 ....change
gt; gt; gt; gt; With ws1
gt; gt; gt; gt; lastrow = .Cells(Rows.Count, quot;Aquot;).End(xlUp).Row
gt; gt; gt; gt; .Cells(r, quot;aquot;).Resize(4, 1).Copy
gt; gt; gt; gt; ws2.Cells(1, quot;Aquot;).Resize(1, 4).PasteSpecial Paste:=xlPasteAll,
gt; gt; gt; gt; Operation:=xlNone, SkipBlanks:= _
gt; gt; gt; gt; False, transpose:=True
gt; gt; gt; gt; Do
gt; gt; gt; gt; .Cells(r, quot;Bquot;).Resize(4, 1).Copy
gt; gt; gt; gt; ws2.Cells(Rows.Count, quot;Aquot;).End(xlUp)(2).Resize(1, 4).PasteSpecial
gt; gt; gt; gt; Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
gt; gt; gt; gt; False, transpose:=True
gt; gt; gt; gt; r = r 5
gt; gt; gt; gt; Loop Until r gt; lastrow
gt; gt; gt; gt; End With
gt; gt; gt; gt; End Sub
gt; gt; gt; gt;
gt; gt; gt; gt; HTH
gt; gt; gt; gt;
gt; gt; gt; gt; quot;Savagequot; wrote:
gt; gt; gt; gt;
gt; gt; gt; gt; gt; sorry, above formatting got messed up
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; company Category URL Listing
gt; gt; gt; gt; gt; 3Com Comm. Product N/A Electrical
gt; gt; gt; gt; gt; 3M Tape, Slice kits www.3m.com Electrical
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; quot;Savagequot; wrote:
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; gt; What I have is
gt; gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; gt; Company 3COM
gt; gt; gt; gt; gt; gt; Category Communication Products
gt; gt; gt; gt; gt; gt; URLURL: N/A
gt; gt; gt; gt; gt; gt; Listing Electrical
gt; gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; gt; Company 3M
gt; gt; gt; gt; gt; gt; Category Tape, Splice Kits
gt; gt; gt; gt; gt; gt; URL www.3m.com/
gt; gt; gt; gt; gt; gt; Listing Electrical
gt; gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; gt; Company ADVANCE
gt; gt; gt; gt; gt; gt; Category Sign Ballast
gt; gt; gt; gt; gt; gt; URL www.advanceelectric.com/
gt; gt; gt; gt; gt; gt; Listing Electrical
gt; gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; gt; What I need to get is
gt; gt; gt; gt; gt; gt; Company Category URL
gt; gt; gt; gt; gt; gt; Listing
gt; gt; gt; gt; gt; gt; Advance Sign Ballast www.advanceelectric.com
gt; gt; gt; gt; gt; gt; Electrical
gt; gt; gt; gt; gt; gt; 3M Tape, Slices www.3m.com
gt; gt; gt; gt; gt; gt; Electrical
gt; gt; gt; gt; gt; gt; 3com Communication Products N/A
gt; gt; gt; gt; gt; gt; Electrical
gt; gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; gt; Thank you for any help,
gt; gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; gt; Kevin

Thank you works great

quot;Toppersquot; wrote:

gt; This probablt due to the quot;wrap roundquot; that occurs in NG. The lines marked gt;gt;
gt; should be one line not two. The quot;_quot; at the end of the second line is a
gt; continuation symbol so the third line should be OK.
gt;
gt; gt;gt;ws2.Cells(1, quot;Aquot;).Resize(1, 4).PasteSpecial Paste:=xlPasteAll,
gt; gt;gt;Operation:=xlNone, SkipBlanks:= _
gt; False, transpose:=True
gt;
gt;
gt; quot;Savagequot; wrote:
gt;
gt; gt; I get an error when I run the code, Compile error syntax error. It
gt; gt; highlights ws2.Cells(1, quot;Aquot;).Resize(1, 4).PasteSpecial Paste:=xlPasteAll,
gt; gt;
gt; gt; Kevin
gt; gt;
gt; gt; quot;Toppersquot; wrote:
gt; gt;
gt; gt; gt; This is VBA code which has to be placed in a module.
gt; gt; gt;
gt; gt; gt; In your EXCel w/book, do ALT F11 which bring up the VB editor (VBE).
gt; gt; gt;
gt; gt; gt; In the Project quot;boxquot; on the LH side, you should see an icon with quot;VBA
gt; gt; gt; Project ( lt;booknamegt;) where lt;booknamegt; is the name of your spreadshhet. Right
gt; gt; gt; click==gt;Insert=gt;Module and copy the code intpo the module.
gt; gt; gt;
gt; gt; gt; To run the code, place the cursor in the code then click the grren arrowhead
gt; gt; gt; in (normally) second toolbar.
gt; gt; gt;
gt; gt; gt; HTH
gt; gt; gt;
gt; gt; gt; quot;Savagequot; wrote:
gt; gt; gt;
gt; gt; gt; gt; I am not sure what you mean?
gt; gt; gt; gt;
gt; gt; gt; gt; quot;Toppersquot; wrote:
gt; gt; gt; gt;
gt; gt; gt; gt; gt; Hi,
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; Try..
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; Sub transpose()
gt; gt; gt; gt; gt; Dim lastrow As Long, r As Long
gt; gt; gt; gt; gt; Dim ws1 As Worksheet, ws2 As Worksheet
gt; gt; gt; gt; gt; Set ws1 = Worksheets(quot;sheet1quot;)
gt; gt; gt; gt; gt; Set ws2 = Worksheets(quot;sheet2quot;)
gt; gt; gt; gt; gt; r = 2 'lt;== assumes data starts in row 2 ....change
gt; gt; gt; gt; gt; With ws1
gt; gt; gt; gt; gt; lastrow = .Cells(Rows.Count, quot;Aquot;).End(xlUp).Row
gt; gt; gt; gt; gt; .Cells(r, quot;aquot;).Resize(4, 1).Copy
gt; gt; gt; gt; gt; ws2.Cells(1, quot;Aquot;).Resize(1, 4).PasteSpecial Paste:=xlPasteAll,
gt; gt; gt; gt; gt; Operation:=xlNone, SkipBlanks:= _
gt; gt; gt; gt; gt; False, transpose:=True
gt; gt; gt; gt; gt; Do
gt; gt; gt; gt; gt; .Cells(r, quot;Bquot;).Resize(4, 1).Copy
gt; gt; gt; gt; gt; ws2.Cells(Rows.Count, quot;Aquot;).End(xlUp)(2).Resize(1, 4).PasteSpecial
gt; gt; gt; gt; gt; Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
gt; gt; gt; gt; gt; False, transpose:=True
gt; gt; gt; gt; gt; r = r 5
gt; gt; gt; gt; gt; Loop Until r gt; lastrow
gt; gt; gt; gt; gt; End With
gt; gt; gt; gt; gt; End Sub
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; HTH
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; quot;Savagequot; wrote:
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; gt; sorry, above formatting got messed up
gt; gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; gt; company Category URL Listing
gt; gt; gt; gt; gt; gt; 3Com Comm. Product N/A Electrical
gt; gt; gt; gt; gt; gt; 3M Tape, Slice kits www.3m.com Electrical
gt; gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; gt; quot;Savagequot; wrote:
gt; gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; gt; gt; What I have is
gt; gt; gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; gt; gt; Company 3COM
gt; gt; gt; gt; gt; gt; gt; Category Communication Products
gt; gt; gt; gt; gt; gt; gt; URLURL: N/A
gt; gt; gt; gt; gt; gt; gt; Listing Electrical
gt; gt; gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; gt; gt; Company 3M
gt; gt; gt; gt; gt; gt; gt; Category Tape, Splice Kits
gt; gt; gt; gt; gt; gt; gt; URL www.3m.com/
gt; gt; gt; gt; gt; gt; gt; Listing Electrical
gt; gt; gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; gt; gt; Company ADVANCE
gt; gt; gt; gt; gt; gt; gt; Category Sign Ballast
gt; gt; gt; gt; gt; gt; gt; URL www.advanceelectric.com/
gt; gt; gt; gt; gt; gt; gt; Listing Electrical
gt; gt; gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; gt; gt; What I need to get is
gt; gt; gt; gt; gt; gt; gt; Company Category URL
gt; gt; gt; gt; gt; gt; gt; Listing
gt; gt; gt; gt; gt; gt; gt; Advance Sign Ballast www.advanceelectric.com
gt; gt; gt; gt; gt; gt; gt; Electrical
gt; gt; gt; gt; gt; gt; gt; 3M Tape, Slices www.3m.com
gt; gt; gt; gt; gt; gt; gt; Electrical
gt; gt; gt; gt; gt; gt; gt; 3com Communication Products N/A
gt; gt; gt; gt; gt; gt; gt; Electrical
gt; gt; gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; gt; gt; Thank you for any help,
gt; gt; gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; gt; gt; Kevin

Topper,
I have basicly the same problem as Savage, but I can't get your module to
work. I get a Run-time error '9': subscript out of range.

Here's what I have: one spread sheet (named mailer 3)with one column.

joe blow
123 some street
houston tx 12345
quot;a blank rowquot;
sally jane
234 same street
fort worth tx 123435
quot;a blank rowquot;
sam spade
345 another street
san antonio tx 12345
quot;a blank rowquot;

This goes on for 3000 names,add., city state zip

What I want to get is:

joe blow 123 some street houston tx 12345
sally jane 234 same street fort worth tx 12345
sam spade 345 another street san antonio tx 12345

What could be causing the run-time error?
quot;Toppersquot; wrote:

gt; Hi,
gt;
gt; Try..
gt;
gt; Sub transpose()
gt; Dim lastrow As Long, r As Long
gt; Dim ws1 As Worksheet, ws2 As Worksheet
gt; Set ws1 = Worksheets(quot;sheet1quot;)
gt; Set ws2 = Worksheets(quot;sheet2quot;)
gt; r = 2 'lt;== assumes data starts in row 2 ....change
gt; With ws1
gt; lastrow = .Cells(Rows.Count, quot;Aquot;).End(xlUp).Row
gt; .Cells(r, quot;aquot;).Resize(4, 1).Copy
gt; ws2.Cells(1, quot;Aquot;).Resize(1, 4).PasteSpecial Paste:=xlPasteAll,
gt; Operation:=xlNone, SkipBlanks:= _
gt; False, transpose:=True
gt; Do
gt; .Cells(r, quot;Bquot;).Resize(4, 1).Copy
gt; ws2.Cells(Rows.Count, quot;Aquot;).End(xlUp)(2).Resize(1, 4).PasteSpecial
gt; Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
gt; False, transpose:=True
gt; r = r 5
gt; Loop Until r gt; lastrow
gt; End With
gt; End Sub
gt;
gt; HTH
gt;
gt; quot;Savagequot; wrote:
gt;
gt; gt; sorry, above formatting got messed up
gt; gt;
gt; gt; company Category URL Listing
gt; gt; 3Com Comm. Product N/A Electrical
gt; gt; 3M Tape, Slice kits www.3m.com Electrical
gt; gt;
gt; gt; quot;Savagequot; wrote:
gt; gt;
gt; gt; gt; What I have is
gt; gt; gt;
gt; gt; gt; Company 3COM
gt; gt; gt; Category Communication Products
gt; gt; gt; URLURL: N/A
gt; gt; gt; Listing Electrical
gt; gt; gt;
gt; gt; gt; Company 3M
gt; gt; gt; Category Tape, Splice Kits
gt; gt; gt; URL www.3m.com/
gt; gt; gt; Listing Electrical
gt; gt; gt;
gt; gt; gt; Company ADVANCE
gt; gt; gt; Category Sign Ballast
gt; gt; gt; URL www.advanceelectric.com/
gt; gt; gt; Listing Electrical
gt; gt; gt;
gt; gt; gt; What I need to get is
gt; gt; gt; Company Category URL
gt; gt; gt; Listing
gt; gt; gt; Advance Sign Ballast www.advanceelectric.com
gt; gt; gt; Electrical
gt; gt; gt; 3M Tape, Slices www.3m.com
gt; gt; gt; Electrical
gt; gt; gt; 3com Communication Products N/A
gt; gt; gt; Electrical
gt; gt; gt;
gt; gt; gt; Thank you for any help,
gt; gt; gt;
gt; gt; gt; Kevin

全站熱搜
創作者介紹
創作者 software 的頭像
software

software

software 發表在 痞客邦 留言(0) 人氣()