taking ap exam = taking the course?

i want to major in economics and i self studied both micro and macro outside of school but i didn't take the class in school. would it still be worth it for admissions if i did econ in school?