Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub search(p_sorszam As Integer, p_sheet As Worksheet, ByVal p_field As String)
- Dim row%, WS As Worksheet
- Set WS = Sheets("IG2KH")
- row% = 3
- p_sheet.Cells(p_sorszam, "B") = "T" & p_field
- Do While WS.Cells(row%, "A") <> ""
- If Cells(row%, "A") = p_field Then
- p_sheet.Cells(p_sorszam, "C") = "P: " & WS.Cells(row%, "D") & ", H: " & WS.Cells(row%, "E")
- Exit Do
- End If
- row% = row% + 1
- Loop
- End Sub
- Sub mm()
- Dim sor%, usor%, WS As Worksheet
- Set WS = Sheets("Sheet1")
- sor% = 3
- usor% = WS.Cells(Rows.Count, "A").End(xlUp).row + 1
- Sheets("IG2KH").Select
- Do While Cells(sor%, "A") <> ""
- If UCase(Left(Cells(sor%, "Q"), 3)) = "E (" Then
- Call search(usor%, WS, Mid(Cells(sor%, "Q"), 5, Len(Cells(sor%, "Q")) - 5))
- WS.Cells(usor%, "A") = "P: " & Cells(sor%, "D") & ", H: " & Cells(sor%, "E")
- usor% = usor% + 1
- End If
- sor% = sor% + 1
- Loop
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement