Dear all,
I want to populate some columns base don some condition in 2 different columns in another worksheet. this is what I am doing:
Set spRange = Worksheet1.Range("D3", "H" & GetLastRowWithData)
//where D and H column contains values such as "forward" and "roll" respecitvely along with lots of other values
For Each cell In spRange
If cell.Value = "Forward" Then
copyRowTo sharePoint.Range("C" & cell.Row), Worksheet2, 1 //copying row to next sheet successfully
End If
Next cell //this function is successfully copying rows which are having value as forward in column D.
.
but What I want is to copy rows ONLY if the value in column D and H is "Forward" and "roll" respectively or may be something like:
For Each cell In spRange
If cell.Value = "Forward" And cell.value ="Roll" Then
copyRowTo sharePoint.Range("C" & cell.Row), ChartSpotDollar, 1 //copying row to next sheet successfully
End If
Next cell
How can I do this?
Any help would be much appreiacted..!!
Bookmarks