The Sun, then Neptune and then the Andromeda galaxy.
The Sun is the closest of the three, followed by Neptune, then Andromeda.
the sun is the closest
About 2.5 million light years from Earth, but since the Earth and Sun are only 8 light minutes apart, there isn't that much of a difference in how far the Andromeda Galaxy is from the Sun or Earth. So the Andromeda Galaxy is about 2.5 million light years from the Sun and Earth.
If you mean the Andromeda galaxy, no, there are two dwarf galaxies that are quite a bit closer - the Magellanic Clouds.
Just about as far as the closest star in the Andromeda Galaxy. The diameter of the Andromeda galaxy is ... well, quite huge, but still relatively small, compared to the distance between us and the Andromeda Galaxy. And I believe this diameter may still be smaller than the uncertainty in the distance estimate!
Andromeda is a galaxy like the Milky Way (the galaxy we are in). Andromeda is the closest major galaxy to our own, and eventually will collide with our galaxy. This is not something we need to worry about however, because our earth will be long gone before the galaxies collide.
In order of distance from EarthNeptuneBarnard's StarAndromedaTriangulum
The Andromeda Galaxy is about 24 000 000 000 000 000 000 km away from Earth.
The closest galaxy that has planets is the Andromeda galaxy. It is the nearest galactic neighbor to the earth. The Milky Way has other planets too.
Andromeda Galaxy
The Andromeda galaxy is about 2.5 million light years away from the earth.
Earth, Sun, Andromeda galaxy and then the universe. increasing size------------------------->