You are not Resetting the count after scrubbing for a value. So in other words, take a look here:
d = 1
j = 2
Do Until IsEmpty(i.Range("D" & j))
If i.Range("D" & j) = "EMAS" Then
d = d + 1
e.Rows(d).Value = i.Rows(j).Value
j = j + 1
At this point, J is greater than 2, and EEAST might have been the first entry, but you didn't check for it.
Then you are starting at D3 to look for EEAST, and it doesn't find it.
You need to run the whole loop before you increment to the next cell to check for logic, OR run a nested loop that will reset the counts to check for the new logic!