Can Excel add values in one column based on the data in another column?

Yes it can. There are various ways of doing it, which would depend on the specific situation. You can use functions like IF and SUMIF to do it.