I recently submitted a topic about grabbing multiple dates for part numbers. But that required me to copy and paste each WIW sheet one by one and run the code.
Attached is the file that I'm looking at. Under "Sheet1", this is what I'm currently doing. However, the worksheet called "Want" is what I would like it to do. And I'm uncertain about how to go about this.
The Dummy Part numbers are numbers that I enter and then I would like it to look at 7R WIW, 8W WIW and 9W WIW to see if they have the dates associated with it. How do I make it look like the "Want" Sheet? I'm currently stuck. Any help is appreciated!
"Sheet1" runs off this code:
PHP Code:
Sub Dummy_File() Dim a, i As Long, ptr As Long Dim sPartNum As String, sOutput As String
ptr = 3 With Worksheets("sheet1") Do While .Cells(ptr, "a") <> vbNullString sPartNum = .Cells(ptr, "a") For i = 1 To 300 If InStr(1, .Cells(i, "e").Value, sPartNum, vbTextCompare) > 0 Then sOutput = sOutput & .Cells(i, "d") & "," End If Next With .Cells(ptr, "b") .ClearContents If sOutput <> "" Then .Value = Left$(sOutput, Len(sOutput) - 1) sOutput = "" End If End With ptr = ptr + 1 Loop End With End Sub
Bookmarks