We discuss the existence, nonexistence and multiplicity of solutions for a class of elliptic equations in the unit ball with zero Dirichlet boundary conditions involving nonlinearities with supercritical growth. By using Pohozaev type identity we prove a nonexistence result for a class of supercritical problems with variable exponent which allow us to complement the analysis developed in (Calc. Var. (2016) 55:83). Moreover, we establish existence results of positive solutions for semilinear elliptic equations involving nonlinearities which are subcritical at infinity just in a part of the domain, and can be supercritical in a suitable sense.