Before trying the macro below, you will have to unmerge all the cells containing "Nama Bangunan Air" in column A of all the worksheets. You should avoid using merged cells at all cost because they almost always give macros problems. Also start with a blank "destination" sheet.
Sub TransposeData()
Application.ScreenUpdating = False
Dim LastRow As Long, desWS As Worksheet, ws As Worksheet, fnd As Range, sAddr As String, Col As Long
Set desWS = Sheets("destination")
For Each ws In Sheets
If ws.Name <> "destination" Then
LastRow = desWS.Range("B" & desWS.Rows.Count).End(xlUp).Row
Set fnd = ws.Range("A:A").Find("Nama Bangunan Air", LookIn:=xlValues, lookat:=xlWhole)
If Not fnd Is Nothing Then
sAddr = fnd.Address
Do
With desWS
Col = .Cells(LastRow + 1, Columns.Count).End(xlToLeft).Offset(0, 1).Column
.Cells(LastRow + 1, Col).End(xlUp).Offset(1).Resize(, 12).Value _
= Array(fnd.Offset(, 2), fnd.Offset(2, 2), fnd.Offset(3, 2), fnd.Offset(5, 2), fnd.Offset(6, 2), fnd.Offset(8, 2), fnd.Offset(9, 2) _
, fnd.Offset(6, 4), fnd.Offset(8, 4), fnd.Offset(9, 4), fnd.Offset(12, 2), fnd.Offset(18, 2))
End With
Set fnd = ws.Range("A:A").FindNext(fnd)
Loop While fnd.Address <> sAddr
sAddr = ""
End If
End If
Next ws
Application.ScreenUpdating = True
End Sub
Bookmarks