Hi I wonder whether someone could possibly help me please.
I'm trying to put together a short script which performs the following:
- Compare column D on the "All Resources" sheet with column B on the "WA - Platform" sheet.
- Where the names match, then compare column G on the "All Resources" sheet with cell "B3" on the "WA - Platform" sheet.
- Then once these match, copy the value from column H on the "All Resources" sheet and paste on the relevant row in column D on the "WA - Platform" sheet.
From some guidance I've received before I've put together the following, but I can't seem to create the second and third match:
Sub Signals()
Dim dic As Object
Dim Dn As Range
Dim rng As Range
Application.ScreenUpdating = False
With Sheets("All Resources")
Set rng = .Range(.Range("D8"), .Range("D" & Rows.Count).End(xlUp))
End With
Set dic = CreateObject("scripting.dictionary")
dic.comparemode = vbTextCompare
For Each Dn In rng
Set dic(Dn.Value) = Dn
Next
With Sheets("WA - Platform")
Set rng = .Range(.Range("B8"), .Range("B" & Rows.Count).End(xlUp))
End With
End Sub
I appreciate that my description may not be enough, so I've attached a file to illustrate the file.
I just wondered whether someone may be able to look at this please and offer some guidance on how I may go about achieving this.
Many thanks and kind regards
Chris
Bookmarks