Hello,
I would like some help regarding the following:
I have a sheet call "PO_Status" which has several columns, I need to copy columns based on certain text (Active) in column F and multiple text in column D (Network, Server, Rack.ect...)
I want the condition to met as following :
IF column F has text (Active) and any of texts in column D then will be copied to an other sheet call Active_sheet.
I have the following code which is not working good.
Sub Active_sheet()
' copy_Active RAP to other sheet
Set i = Sheets("PO_Status")
Set e = Sheets("Active_sheet")
Dim d
Dim j
d = 1
j = 2
Do Until IsEmpty(i.Range("F" & j))
If i.Range("F" & j) = "Active" And i.Range("D" & j) = "Network" Or i.Range("D" & j) = "Server" Or i.Range("D" & j) = "Rack" Then
d = d + 1
e.Rows(d).Value = i.Rows(j).Value
i.Select
Rows(j).Copy
e.Select
Rows(d).PasteSpecial
End If
j = j + 1
Loop
Bookmarks