I just promoted into this position and am learning Excel for the first time. I have a "not working" sheet and a "didn't work yesterday" sheet in the same workbook. I'm trying to compare people who skipped work yesterday against who skipped work today and "Ctrl+C, CRTL+V" was getting old very fast so I decided to try to teach myself VBA in order to get more work done. Thus far I have:
What I need help with is how to compare the B columns. Copying the Column C info for that row will be the confirmation that the person is on both lists.
I've gotten a little stuck since I am not sure why I Dimmed B1 As Range last week and I'm not sure how to do anything further. I need to take Column B "Current List" (Sheet 1) and compare it against Column B "Prev NCNS Here" (Sheet 2), and eventually I want to paste whatever is in Column C Prev NCNS Here into Column C Current List (I have already done this before, I don't need help with Column C).Sub comparison()
Dim B1 As Range
Dim Dic As Object
Set Dic = CreateObject("Scripting.Dictionary")
Dim ws1 As Worksheet
Set ws1 = Application.Worksheets("Current List")
Dim ws2 As Worksheet
Set ws2 = Application.Worksheets("Prev NCNS Here")
With Sheets(ws1)
For Each B1 In ws2.Range("B:B",
End With
With Sheets(ws2)
End With
End Sub
What I need help with is how to compare the B columns. Copying the Column C info for that row will be the confirmation that the person is on both lists.