Let X be a Banach space. Fix a torsion-free commutative and cancellative semigroup S whose torsion-free rank is the same as the density of $$X^{**}$$
X
∗
∗
. We then show that X is complemented in $$X^{**}$$
X
∗
∗
if and only if there exists an invariant mean $$M:\ell _\infty (S,X)\rightarrow X$$
M
:
ℓ
∞
(
S
,
X
)
→
X
. This improves upon previous results due to Bustos Domecq (J Math Anal Appl 275(2):512–520, 2002), Kania (J Math Anal Appl 445:797–802, 2017), Goucher and Kania (Studia Math 260:91–101, 2021).