| View previous topic :: View next topic |
| Author |
Message |
agrose Newbie

Joined: 03 Aug 2012 Posts: 2
|
Posted: Fri Aug 03, 2012 4:31 pm Post subject: [Solved]If/Then Conditional Formatting Involving Multiple |
|
|
Hey, I am relatively new to using OpenOffice Calc, and very inept at using formulas. What I am trying to do is create a budgeting spreadsheet. In one column I want to be able to just enter the $ amount for what expenses I have incurred over the month, and in the cell next to each expense (in the next column over) I would like to specify the "type" of expense, by use of a drop-down list. I have been able to do that much on my own - I have created a drop-down list of "expense types" etc. The problem I am coming across is I want to make a formula, or have some other way to see, the $ TOTAL of all expenses for a month, of a specific type , as outlined in the "expense type" column. For example, say that I want to capture how much was spent on food each month...there would be multiple $ entries, and each would be specified as "food" for the expense type. There would be other $ expenses listed in the column, but I would only want the total to reflect those $ that relate the the "food" expense type. Does that even make sense? Something like "=sum(D6:D30)IF(E6:E30)="text" I obviously know that a formula like the one I just said would never work...but is there something that I can do/use that would work for what I am trying to do? Thanks!
Last edited by agrose on Sat Aug 04, 2012 7:29 pm; edited 1 time in total |
|
| Back to top |
|
 |
ken johnson Super User

Joined: 23 Apr 2009 Posts: 1851 Location: Sydney, Australia
|
Posted: Fri Aug 03, 2012 4:45 pm Post subject: |
|
|
Try the SUMIF function. [SUMIF(Range; Criteria; SumRange)]
Could be, for sum of "food" expenses,...
| Code: | | =SUMIF($E$6:$E$30; "food"; $D$6:$D$30) |
Or you could enter the expense type into a cell (eg F2) then use...
| Code: | | =SUMIF($E$6:$E$30; $F$2; $D$6:$D$30) |
The presence or absence of the "$" signs depends on the way you use the formula in different cells.
Ken Johnson _________________ If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button). |
|
| Back to top |
|
 |
ozzie OOo Advocate

Joined: 29 Jul 2010 Posts: 316 Location: victoria
|
Posted: Fri Aug 03, 2012 5:59 pm Post subject: |
|
|
By the time I had made up my sheet Ken had already posted.
I wasn't going to post but it is a little different from Ken's in that it uses SUMPRODUCT and besides I think that if my mediafire account doesn't get used every 6 months it gets closed down.
http://www.mediafire.com/?98r3trza3a84s52 _________________ If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button). |
|
| Back to top |
|
 |
agrose Newbie

Joined: 03 Aug 2012 Posts: 2
|
Posted: Sat Aug 04, 2012 7:32 pm Post subject: |
|
|
| Thank you so much ken and ozzie - your posts were incredibly helpful, and gave me exactly what I needed. Thanks again! |
|
| Back to top |
|
 |
|