I\'m new to programming in VBA and I\'m looking To take data from different worksheets that matches a condition. Then copy and paste from one specific cell to another specific
Try this. I'm assuming you want to paste into row 18 and then 19 etc, and not 18 repeatedly!
Sub CopyValues()
'Declare variables
'Declare sheet variables
Dim Sourcews As Worksheet
Dim Pastews As Worksheet
'Declare counter variables
Dim i As Long
Dim n As Long
Dim lastrow As Long
Set Sourcews = ThisWorkbook.Sheets("Source")
Set Pastews = ThisWorkbook.Sheets("Paste")
lastrow = Sourcews.Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
n = 18
For i = 3 To lastrow
If Sourcews.Cells(i, "AA").Value = "Needed Value" Then
Sourcews.Cells(i, "AA").Copy Pastews.Cells(n, "C").Resize(, 6)
n = n + 1
End If
Next
End Sub