Any and all help or suggestions are certainly appreciated... I'm working with two separate workbooks.
Workbook X is my "Order Form", this contains relevant columns: column A: item num column B: qty
I want to pull both the item number and the qty value ONLY IF qty > 0 or <> NULL.
This data will then be sent to Workbook Y, which contains: column B: item num column C: qty
Below is one variation of the code I've attempted, I'm about 5 hours into this and running low on ideas.
Thanks!
Dim x As Workbook
Dim y As Workbook
'Open both workbooks
Set x = Workbooks.Open(Me.txtSelect)
Set y = Workbooks.Open(Me.txtOutput)
Dim i As Integer
i = 1
While i < 200
'Extract data from sheet x into sheet y
If x.Sheets("Order Form").Cells(i, 2).Value > 0 Then
x.Sheets("Order Form").Cells(i, 1).Value = y.Sheets("UploadTemplate").Cells(B2 + i).Value
x.Sheets("Order Form").Cells(i, 2).Value = y.Sheets("UploadTemplate").Cells(C2 + i).Value
Else
End If
i = i + 1
Wend
Here was the original code I had in place of the "While", but was getting ALL values:
If x.Sheets("Order Form").Range("B9").Value > 0 Then
x.Sheets("Order Form").Range("A9:B200").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=x.Sheets("Order Form").Range("A11:B11"), CopyToRange:=y.Sheets("UploadTemplate").Range("B2:C2") _
, Unique:=False
End If