Upvote:2
You will clear Schengen passport control in Barcelona, leaving the international transit zone for the area of the airport devoted to internal Schengen flights. Your Schengen visa issued by Portugal is valid for this purpose.
Because Portugal and Spain are both in the Schengen zone, your flight will depart from the area of the airport devoted to internal Schengen flights, just the same as if your flight were a domestic flight from Barcelona to Madrid. There will be no passport control in Lisbon.
Do I need another transit visa for Spain?
No.
Can I use the transit area of the Barcelona airport?
Yes, and you can (and will) leave it, too.
Upvote:3
You do not need a separate visa to transit a Schengen port if you already have a Schengen visa. You will be fine in both Barcelona and Lisbon.
Number of entries might matter in some cases but not in this one.