Excel 'If Then' or 'When' statement
Posted on 2004-11-09
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
Then in the totals section I'm wanting to see this:
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.