Hi Igomathi and welcome to the forum.
Find the attached with the following code
Option Explicit
Sub FirstMacro()
Dim RowCtr As Double
Dim ColCtr As Double
Dim LastRow As Double
Dim BottomRow As Double
LastRow = Cells(2, 1).End(xlDown).Row
For RowCtr = 3 To LastRow
For ColCtr = 5 To 9
If Cells(RowCtr, ColCtr).Value > 0 Then
BottomRow = Cells(Rows.Count, "A").End(xlUp).Row + 1
Cells(BottomRow, "A").Value = Cells(RowCtr, "A").Value
Cells(BottomRow, "B").Value = Cells(RowCtr, "B").Value
Cells(BottomRow, "C").Value = Right(Cells(2, ColCtr).Value, 5)
Cells(BottomRow, "D").Value = Cells(RowCtr, ColCtr).Value
End If
Next ColCtr
Next RowCtr
End Sub
Bookmarks