Don’t ever, for any reason, do anything, to anyone, for any reason, ever, no matter what, no matter where, or who, or who you are with, or where you are going, or where you’ve been, ever, for any reason whatsoever
— the world would be a better place if we all just listened to michael scotts advice
But Really: Andy’s always made comments about men in the show (one thing I can think of was him calling Jim up and telling him he was horny) but I think the biggest example of Andy’s sexuality was in season 6 episode 1, Michael spreads rumors about everyone in the office, including one that Andy is gay. Andy admits that this is the second time this rumor has happened (the first in college), and he doubts his sexuality. He goes to Oscar, the only out gay man in the office, for advice, and when Oscar asks if he’s attracted to men, Andy says, no, but follows it up with:
“But let me give you a scenario. I’m at a beach cabana. Brad Pitt comes up and tries to kiss me. I would definitely resist at first, but if he was persistent, I would probably give in a little bit, depending on how persistent he was…”
When Oscar expresses confusion at the scenario, Andy says it’s just his fantasy (and then tries to cover up the fact he said it was a fantasy). He later admits to Jim that he’s not sure if he’s straight or not, and that he’s confused. By the end of the episode, Michael admits he made up most of the rumors and that only one is real, prompting Andy to ask if the rumor about him being gay is real.
Andy has had multiple attractions toward women, but also made sure other people - mostly men, like Jim - knew about it. While I believe he is attracted to women (such as Erin, one of his long time girlfriends in the show), I think Andy had internalized biphobia. The character was very concerned with what people thought of him, and wanted to be accepted. The fact that Andy admitted he wasn’t sure and that he relied on Michael and Oscar to tell him what his sexuality was leads me to believe he was bi but not ready to admit it to himself.