Monday, January 18, 2016

Transpose the Bulk address data using the Macro or VBA code

Transpose the Bulk address data using the Macro or VBA code:

Query is mentioned in the below image:

Solution:

Sub TransposeColToRow()
Dim LastRow As Integer
Dim j As Integer
Dim SaveJ As Integer
Dim Myvalue As String
Dim CurrValue
LastRow = Range(“A65536”).End(xlUp).Row
k = 0
l = 0
For j = 1 To LastRow
If Range(“A” & j).Value “” Then
Range(“D1”).Offset(k, l).Value = Range(“A” & j).Value
l = l + 1
Else
l = 0
k = k + 1
End If
Next j
End Sub

No comments:

Post a Comment