Basically I would like to take the file I've attached and take the Case number, for example 224.4642857, and copy its corresponding color from the Box Height to the new sheet called "Slotting". I have looked online for various code and do not know how to do this. Can someone please help?
Sub ReColour()
Dim rStart As Range, lRow1 As Long, lRow2 As Long, lRows As Long, sFind As String
Set rStart = Sheet1.Range("A1")
lRows = rStart.Offset(65000, 0).End(xlUp).Row - rStart.Row
For lRow1 = 1 To lRows
sFind = rStart.Offset(lRow1, 3).Value
For lRow2 = 1 To lRows
If rStart.Offset(lRow2, 0).Value = sFind Then
rStart.Offset(lRow1, 3).Interior.ColorIndex = rStart.Offset(lRow2, 0).Interior.ColorIndex
rStart.Offset(lRow1, 4).Interior.ColorIndex = rStart.Offset(lRow2, 1).Interior.ColorIndex
rStart.Offset(lRow1, 5).Interior.ColorIndex = rStart.Offset(lRow2, 2).Interior.ColorIndex
Exit For
End If
Next
Next
End Sub
Coolstuff.xlsm
Bookmarks