traveler84
traveler84

Reputation: 474

Excel if statement / Sum of Column

I'd like to create a formula to say if anything in A column has "Admission" then sum the adjoining B column. I know I could do this cell by cell and sum up the cells, but is it possible to have one text box that can do this by itself?

I'm creating an Expenses page for our honeymoon to see where the money is going. I should be able to see how much we spend on Admission prices, Hotel, etc. But to keep it simple, I didnt want to make a bunch of boxes that has random value in it if I could avoid it. So I created a summary page that has a text box for a specific day. So for September XX, I could select the boxes, and if it has "Admission" in one field (simple reasons A column) then I would like to add the B cell next to it to obtain a sum.

I've looked up everything but can't seem to get it to work. So now, I'm asking for help.

Thank you!

A1 Breakfast - B1 $5

A2 Lunch - B1 $5

A3 Dinner - B1 $5

A4 Admission - B1 $5

A5 Event - B1 $5

A6 Admission - B1 $5

A7 Snack - B1 $5

A8 Event - B1 $5

Upvotes: 3

Views: 21167

Answers (2)

Alain
Alain

Reputation: 27220

Use the following formula:

=SUMIF(A:A, "Admission", B:B)

If you put in in a table, and instead of typing the expense type into the forumla, you reference the table column header, you can even copy paste the formula for a quick sum of all types!

enter image description here

Concidentally, I keep track of my own expenses in the exact same way, using a spreadsheet :p enter image description here

(You can do the same thing with CountIf, to get the count and calculate the average expense. Min and Max are a little more complicated.)

Upvotes: 9

assylias
assylias

Reputation: 328608

This should

=SUMIF(A:A,"Breakfast",B:B)

and enjoy your honey moon!

Upvotes: 2

Related Questions