I hope you can help me!
I am struggling to get this function to work. I have a spreadsheet with X's on, as if they were ticks. Basically I need to copy cell A if F = x.
This is what I have so far. Something is wrong with it, I know as much, I just don't know what. shTarget and shsource is set in my initial code. it is currently inserting all the cells into K15 or 16. (Merged cell)
I am struggling to get this function to work. I have a spreadsheet with X's on, as if they were ticks. Basically I need to copy cell A if F = x.
Code:
Dim lRow As Long
'Determine the last Row.
lRow = shTarget.Cells.Find("*", LookIn:=xlValues, Searchorder:=xlByRows, Searchdirection:=xlPrevious).Row
For Each Cell In Range("F1:F500")
If Cell.Value = "X" Then
Range("A" & Rows.Count).End(xlUp).Copy
shTarget.Cells(lRow, 11).PasteSpecial xlPasteValuesAndNumberFormats
End If
Next Cell
This is what I have so far. Something is wrong with it, I know as much, I just don't know what. shTarget and shsource is set in my initial code. it is currently inserting all the cells into K15 or 16. (Merged cell)