Sorry Ariel, I appear to be having some "issues" with getting my head around this.
This is turning a bit ugly code-wise, but appears to work against:<TABLE style="WIDTH: 137pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=183 border=0><COLGROUP><COL style="WIDTH: 137pt; mso-width-source: userset; mso-width-alt: 6692" width=183><TBODY><TR style="HEIGHT: 15.75pt" height=21><TD class=xl64 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 137pt; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15.75pt; BACKGROUND-COLOR: transparent" width=183 height=21>
HEADER</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
A's Business 1</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
400 Some Road</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
Cedar Falls, IA</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
Phone: (800) 111-2222</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
www.address1.com</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
info@address1.com</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
Aaron's Name place</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
110 L Street</TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15.75pt; BACKGROUND-COLOR: transparent" height=21>
Omaha, NE</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
Phone: (888) 222-3333</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
A1 Something</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
4 Flagstaff Rd</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
Rochester, NH</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
Phone: (800) 000-1234</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
www.a1something.com</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
brandon@a1somes.com</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
ABC Other Stuff</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
5000 Old Seward Hwy</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
Anchorage, AK</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
Phone: (800) 111-3455</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
www.abcothers.com</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
mark@somewhere.net</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
gto@nowhere.hotmail</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
http://arielspage.com</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
Loper's Performance Center</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
900 E. Indian School Rd.</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
Phoenix, AZ</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
Phone800)555-5555</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
Hal's Radiator Repair</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
5100 W. Glendale Ave</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
Glendale, AZ</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
Phone: (555) 111-0033</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
Lucky's Supermarket</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
3502 W. Glendale</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
Phoenix, AZ</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
Phone: (123) 321-0037</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
Lucky.com</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
www.lucky.com</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
http://lucky.com/home</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl65 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: transparent" height=20>
mrlucky@freemail.com
Which returns:
Excel Workbook |
---|
|
---|
| C | D | E | F | G | H |
---|
1 | NAME | ADDRESS | LOCATION | PHONE | EMAIL | WEB |
---|
2 | A's Business 1 | 400 Some Road | Cedar Falls, IA | Phone: (800) 111-2222 | info@address1.com | www.address1.com |
---|
3 | Aaron's Name place | 110 L Street | Omaha, NE | Phone: (888) 222-3333 | | |
---|
4 | A1 Something | 4 Flagstaff Rd | Rochester, NH | Phone: (800) 000-1234 | brandon@a1somes.com | www.a1something.com |
---|
5 | ABC Other Stuff | 5000 Old Seward Hwy | Anchorage, AK | Phone: (800) 111-3455 | mark@somewhere.net | www.abcothers.com |
---|
6 | | | | | gto@nowhere.hotmail | http://arielspage.com |
---|
7 | Loper's Performance Center | 900 E. Indian School Rd. | Phoenix, AZ | Phone:(800)555-5555 | | |
---|
8 | Hal's Radiator Repair | 5100 W. Glendale Ave | Glendale, AZ | Phone: (555) 111-0033 | | |
---|
9 | Lucky's Supermarket | 3502 W. Glendale | Phoenix, AZ | Phone: (123) 321-0037 | http://lucky.com/home | Lucky.com |
---|
10 | | | | | mrlucky@freemail.com | www.lucky.com |
---|
|
---|
Excel 2010
Still in a Standard Module...
Rich (BB code):
Option Explicit
Sub ArielsParser()
Dim REX As Object '<--- RegExp
Dim rngData As Range
Dim Cell As Range
Dim aryOutput() As String
Dim aryTranspose As Variant
Dim lEndRow As Long
Dim lRow As Long
Dim n As Long
Dim nn As Long
Dim lLastEmail As Long
Dim lFirstEmail As Long
Dim lCurEmail As Long
Dim lLastVal As Long
Dim lLastCompanyName As Long
Dim strPattern As String
Dim bolRuleOutLastRecord As Boolean
With shtPostalCodes
For Each Cell In .Range(.Cells(2, 3), .Cells(.Rows.Count, 3).End(xlUp)).Cells
strPattern = strPattern & Cell.Value & "|"
Next
strPattern = Left(strPattern, Len(strPattern) - 1)
strPattern = "([A-z\ ]+\,\ +)(" & strPattern & ")"
End With
Set REX = CreateObject("VBScript.RegExp")
With REX
.Global = False
.IgnoreCase = True
.Pattern = strPattern
End With
ReDim aryOutput(1 To 6, 1 To 1)
aryOutput(1, 1) = "NAME"
aryOutput(2, 1) = "ADDRESS"
aryOutput(3, 1) = "LOCATION" '<---Look for
aryOutput(4, 1) = "PHONE"
aryOutput(5, 1) = "EMAIL"
aryOutput(6, 1) = "WEB"
lEndRow = shtRawData.Cells(shtRawData.Rows.Count, 1).End(xlUp).Row
With REX
For n = 2 To lEndRow
bolRuleOutLastRecord = False
If .Test(shtRawData.Cells(n, 1).Value) Then
ReDim Preserve aryOutput(1 To 6, 1 To UBound(aryOutput, 2) + 1)
lLastCompanyName = UBound(aryOutput, 2)
aryOutput(1, UBound(aryOutput, 2)) = shtRawData.Cells(n - 2, 1).Value
aryOutput(2, UBound(aryOutput, 2)) = shtRawData.Cells(n - 1, 1).Value
aryOutput(3, UBound(aryOutput, 2)) = shtRawData.Cells(n, 1).Value
aryOutput(4, UBound(aryOutput, 2)) = shtRawData.Cells(n + 1, 1).Value
If Not .Test(shtRawData.Cells(n + 4, 1).Value) Then
For nn = n + 2 To lEndRow
If .Test(shtRawData.Cells(nn, 1).Value) Then
bolRuleOutLastRecord = True
lLastEmail = nn - 3
lFirstEmail = n + 2
'// Pattern based on: http://regexlib.com/UserPatterns.aspx?authorId=a0877382-1449-42c3-85eb-385493eb2a58 //
'// By: Remi Sabourin //
.Pattern = "^(http://)?([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$"
If .Test(shtRawData.Cells(lFirstEmail, 1).Value) Then
aryOutput(6, UBound(aryOutput, 2)) = shtRawData.Cells(lFirstEmail, 1).Value
Else
aryOutput(5, UBound(aryOutput, 2)) = shtRawData.Cells(lFirstEmail, 1).Value
End If
For lCurEmail = lFirstEmail + 1 To lLastEmail
If .Test(shtRawData.Cells(lCurEmail, 1).Value) Then
If Not aryOutput(6, UBound(aryOutput, 2)) = Empty Then
ReDim Preserve aryOutput(1 To 6, 1 To UBound(aryOutput, 2) + 1)
End If
lLastVal = UBound(aryOutput, 2)
Do
lLastVal = lLastVal - 1
Loop While aryOutput(6, lLastVal) = Empty And lLastVal >= lLastCompanyName
aryOutput(6, lLastVal + 1) = shtRawData.Cells(lCurEmail, 1).Value
Else
If Not aryOutput(5, UBound(aryOutput, 2)) = Empty Then
ReDim Preserve aryOutput(1 To 6, 1 To UBound(aryOutput, 2) + 1)
End If
lLastVal = UBound(aryOutput, 2)
Do
lLastVal = lLastVal - 1
Loop While aryOutput(5, lLastVal) = Empty And lLastVal >= lLastCompanyName
aryOutput(5, lLastVal + 1) = shtRawData.Cells(lCurEmail, 1).Value
End If
Next
.Pattern = strPattern
Exit For
End If
Next
If Not bolRuleOutLastRecord Then
.Pattern = "^(http://)?([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$"
If .Test(shtRawData.Cells(n + 2, 1).Value) Then
aryOutput(6, UBound(aryOutput, 2)) = shtRawData.Cells(n + 2, 1).Value
Else
aryOutput(5, UBound(aryOutput, 2)) = shtRawData.Cells(n + 2, 1).Value
End If
For lCurEmail = n + 3 To lEndRow
If .Test(shtRawData.Cells(lCurEmail, 1).Value) Then
If Not aryOutput(6, UBound(aryOutput, 2)) = Empty Then
ReDim Preserve aryOutput(1 To 6, 1 To UBound(aryOutput, 2) + 1)
End If
lLastVal = UBound(aryOutput, 2)
Do
lLastVal = lLastVal - 1
Loop While aryOutput(6, lLastVal) = Empty And lLastVal >= lLastCompanyName
aryOutput(6, lLastVal + 1) = shtRawData.Cells(lCurEmail, 1).Value
Else
If Not aryOutput(5, UBound(aryOutput, 2)) = Empty Then
ReDim Preserve aryOutput(1 To 6, 1 To UBound(aryOutput, 2) + 1)
End If
lLastVal = UBound(aryOutput, 2)
Do
lLastVal = lLastVal - 1
Loop While aryOutput(5, lLastVal) = Empty And lLastVal >= lLastCompanyName
aryOutput(5, lLastVal + 1) = shtRawData.Cells(lCurEmail, 1).Value
End If
Next
Exit For
End If
End If
End If
Next
End With
For n = LBound(aryOutput, 1) To UBound(aryOutput, 1) - 1
If aryOutput(5, n) = aryOutput(1, n + 1) Then aryOutput(5, n) = Empty
Next
'// IF in Excel2000, send aryOutput to another function to "manually" transpose. //
aryTranspose = Application.Transpose(aryOutput)
With shtRawData.Range("C1").Resize(UBound(aryTranspose, 1), UBound(aryTranspose, 2))
.Value = aryTranspose
With .Rows(1)
.Font.Bold = True
.HorizontalAlignment = xlCenter
End With
.EntireColumn.AutoFit
End With
End Sub
If that works and you want any part explained, I'll comment it up.
Have a great weekend
,
Mark