Formula for addition

T

tigermoth

If I have the followings table
A B
1 Code Amt
2 501 70
3 500 85
4 501 75
5 502 50
6 500 55
7 501 10
8
How do I set the formula to add the total amount for code 501in say cell B8?

Thanks
 
R

Ron Coderre

Try this:

B8: =SUMIF(A2:A7,"501",B2:B7)

Does that help?
Post back if you have more questions.
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)
 
R

Ron Coderre

Actually, regarding numbers (501) and numeric text ("501")..
Both of these SUMIF formulas pick up 501 and "501":
B8: =SUMIF(A2:A7,501,B2:B7)
B8: =SUMIF(A2:A7,"501",B2:B7)

....and would return 155 using the sample data.

So, in that particular case, the quotes in the criteria were unnecessary.

--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top