24 astronauts have flown to the moon, and of those, 12 walked on the moon.
12 astronauts who flew to the moon:
Frank Borman, Jim Lovell (twice!),
William Anders, Thomas P. Stafford,
Michael Collins, Richard F. Gordon Jr.,
Fred Haise, Jack Swigert,
Stuart Roosa, Alfred Worden,
Ken Mattingly, and Ronald Evans.
12 astronauts who flew to and also walked on the moon:
Neil Armstrong, Buzz Aldrin,
Pete Conrad, Alan Bean,
Edgar Mitchell, Alan Shepard,
David Scott, James Irwin,
John Young (flew twice, walked once), Charles Duke,
Gene Cernan, and Harrison Schmitt.
When I say John Young walked once, I mean he went on one Apollo mission to walk on the moon.
Wally Schirra was one of the original seven astronauts chosen for Project Mercury.
On October 3, 1962, Schirra launched in a Mercury spacecraft he nicknamed Sigma 7 to become the fifth American, and ninth human, to travel to space.
On December 15, 1965, Schirra launched in Gemini 6A with Thomas P. Stafford to achieve the first space rendezvous, station-keeping his Gemini 6A spacecraft within 1 foot of the sister Gemini 7.
On October 11, 1968, Schirra launched in Apollo 7 to be in the first mission in the Apollo program, with Donn F. Eisele and R. Walter Cunningham to carry a crew into space. It was also the first U.S. spaceflight to carry astronauts since the flight of Gemini XII in November 1966.
Schirra was the first astronaut to go into space three times, and the only astronaut to have flown in the Mercury, Gemini, and Apollo programs.