Specific IF statement problem

G

gloriousglenn

Hi all!

I have a spreadsheet for my banking and one worksheet has all of my
credit card debits and credits on it (Column A - Date, B - Amount, C -
Merchant etc).

I want to figure out how much I'm spending on fuel for my car each
month, so I put a comment in column D saying "Fuel" whenever I've made
a fuel transaction.

Now what I would like, is a cell at the bottom to add up all of the
entries in Column B (Amount) only if Column D has the word "Fuel" in
it.

I hope I have explained this well enough!

Any help would be appreciated.

Best regards
Glenn
 
P

Pete_UK

Try this:

=SUMIF(D1:D50,"Fuel",B1:B50)

Adjust the ranges to suit.

Hope this helps.

Pete
 
M

Mike H

Hi,

Put a date in E1 that is the month you want to sum for and try this

=SUMPRODUCT((MONTH(A2:A20)=MONTH(E1))*(D2:D20="Fuel")*(B2:B20))

Adjust the ranges to suit
Mike
 

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