Addings cells in a table

How can I get Excel to add up cells and give me total looking at various cells in a table. The addition will be using only two variables. So for example, if the variable is "JD" then lookup all the JDs and add them up.