In Harry Potter
Ernie Macmillan began attending Hogwarts in 1991 and was sorted into Hufflepuff, where he became friends with Hannah Abbott, Susan Bones and Justin Finch-Fletchley.
In 1992, he suspected that Harry Potter might be the heir of Slytherin, as he heard Harry speaking Parseltongue at the Duelling Club. He later realized that Harry was not the heir when he found out that Hermione Granger was petrified, as he knew that Harry would never harm his best friends, and gave a public apology to Harry.
In 1994, Ernie supported Cedric Diggory during the Triwizard Tournament as Cedric was from his house of Hufflepuff. He later believed in Harry that Voldemort had returned when Cedric Diggory was killed. Ernie joined Dumbledore's Army and was a great Hufflepuff member.
His support for Harry was so strong that he was with Dumbledore's Army when they participated in The Battle of Hogwarts in 1998 until Voldemort was killed. Ernie likely survived the war and his life after is unknown.