Could someone please give us some help with this code...
1) Read DRA Summary sheet and find GQ-000
2) Find GQ-000 in the Data sheet
3) Get the value in the 5th column(Data sheet) and move it to the cell that is above the cell where GQ-000 was found in the DRA Summary sheet.
4) Repeat until all occurrences of GQ-* have been found.
I attached the workbook also.
Code so far...
Dim rng As Range, cell As Range
Dim lc As Long, ResultCol As Long
Dim s As String, sInput As String
lc = Cells(3, Columns.Count).End(xlToLef
ResultCol = 5
Set rng = Range(Cells(3, 1), Cells(3, lc))
'Set lookup range
Set LkupRng = Sheets("Data").Range("A1")
For Each cell In rng
If cell.Value Like "GQ-*" Then
s = Left(cell.Value, InStr(1, cell.Value & " ", " ") - 1)
'MsgBox "s: " & s
On Error Resume Next
v = Application.VLookup(s, Worksheets("Data").Range("
lc"), 5, 0)
x = Application.VLookup(s, Worksheets("Data").Range("
A:E"), 5, 0)
Sheets("DRA Summary").Range("F2") = v