Link to home
Start Free TrialLog in
Avatar of inetomaha
inetomaha

asked on

Excel 'If Then' or 'When' statement

OK, I'm doing some accounting in an excel spreadsheet where I list out all of my transactions. I then want to sum up the transactions depending on how they are labeled without sorting them or anything like that. Basically I'm wanting to come up with a formula to look at an entire column and determine if a number should be counted or not. Here's an example:

Col. A       Col. B
deposit     50.00
credit       100.00
credit       120.00
misc.        50.00
deposit     200.00
credit       25.00

Then in the totals section I'm wanting to see this:

deposits    250.00
credits      245.00
misc.        50.00

So for the deposits total I'm wanting to add up all of column b if column a says deposit, and the same for credits and misc. Is this possible? I've thought about making hidden columns where the totals show up if column a says a specific thing and then adding up that hidden column but then every time I come up with a new type for column a i'm going to have to create a new hidden column rather than just copy my formula over again.
ASKER CERTIFIED SOLUTION
Avatar of sebastienm
sebastienm

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of inetomaha
inetomaha

ASKER

That worked great!!! Thanks Sebastien!

-marshall-
Thanks for the points and grade, Marshall.  Glad i could help.
Sebastien