Try this code........
Sub amethystfeb()
Dim rng As Range, cell As Range, rng1 As Range, cell1 As Range
Dim lr As Long, lc As Integer
lr = Cells(Rows.Count, "C").End(xlUp).Row
lc = Cells(4, Columns.Count).End(xlToLeft).Column
Set rng = Range(Cells(4, 5), Cells(4, lc))
Application.ScreenUpdating = False
For Each cell In rng
Set rng1 = Range(Cells(5, cell.Column), Cells(lr, cell.Column))
For Each cell1 In rng1
If cell1 = "x" Then
cell1 = cell
Cells(cell1.Row, "L") = cell
End If
Next cell1
Next cell
Application.ScreenUpdating = True
End Sub
Bookmarks