Major indexes struggled to a mixed finish on Wall Street after giving up an early gain Tuesday.

The S&P 500 slipped as losses for technology and health care companies offset gains in other sectors. Elsewhere, the Nasdaq fell slightly and the Dow Jones Industrial Average edged higher.

The back-and-forth trading came as investors returned from the Memorial Day holiday in the U.S.

On Tuesday:

The S&P 500 fell 2.07 points, or less than 0.1%, to 4,202.04.

The Dow Jones Industrial Average rose 45.86 points, or 0.1%, to 34,575.31.

The Nasdaq fell 12.26 points, or 0.1%, to 13,736.48.

The Russell 2000 index of smaller companies rose 25.77 points, or 1.1%, to 2,294.74.

For the year:

The S&P 500 is up 445.97 points, or 11.9%.

The Dow is up 3,968.83 points, or 13%.

The Nasdaq is up 848.20 points, or 6.6%.

The Russell 2000 is up 319.89 points, or 16.2%.