I've used this code to find a cell with a value on one sheet and copy a cell adjacent to the found one back to the original sheet, also with an offset.
Now I just want to find the cell and copy the entire row it was found on from one sheet back to the original. Best I can get is a row where each cell is "TRUE" or just the copying the one found cell back to the one source cell.
I guess I could make an offset for every cell in the row but that seems like overkill.
Now I just want to find the cell and copy the entire row it was found on from one sheet back to the original. Best I can get is a row where each cell is "TRUE" or just the copying the one found cell back to the one source cell.
I guess I could make an offset for every cell in the row but that seems like overkill.
VBA Code:
Sub Button1_Click()
'***Get Row from the AControl RoomDB Import Firs Sheet
Dim sh As Worksheet, rng As Range, d As String, fRng As Range, CL As Range
Set sh = Worksheets("New PTCU1 InTouch Import")
With sh
Set fRng = Worksheets("New PTCU1 InTouch Import").Range("A10:A10")
For Each CL In fRng
If Not IsEmpty(CL.Value) Then
With Worksheets("Control RoomDB Import First").Range("A:A")
Set rngFound = .Find(CL.Value, LookIn:=xlValues, LookAt:=xlWhole)
If Not rngFound Is Nothing Then
'CL.Offset(, 3).Value = Replace(rngFound.Offset(, 1), "_", "-")
CL = rngFound.EntireRow.Copy
End If
End With
End If
Next CL
End With
End Sub