I have this troublesome formula I've been working on.
According to what I've read so far in this forum, this will be cakewalk for you guys to find out of (or at least so I hope.. :-)
I don't know much about Excel, and what I do know is just logic sense, and a bit of common math.
My problem is in a sheet I use for my personal economy. (I'm a neatfreak, and a nerd...)
The logic of my sheet is that I seperate the different type of monthly expenses, and sum them individually. The way I do this is that the A Column identyfies an expense (where 1 = rent, 2 = food, 3 = gas etc) while the C column is the expense itself, Example:
A B C
On account 500
1 rent -200
2 food -20
3 gas -10
2 food -10
Sum expenses -240
On account 260
I then use this formula to discern them:
{=ABS(SUM(IF(A$4:A$30=X;C$4:C$30;0)))}
where X is substituted for the number in the A column.
1 would give 200
2 would give 30
3 would give 10
This works swimmingly. The problem comes here:
A B C
On account 500
1 rent -200
2 food -20
3 gas -10
2 food -10
4 to saving -100
Sum expenses -340
On account 160
As you see, what is going to my saving account is registered as an expence, which isn't right... (I want the sum expenses to still be 240) So I've tried to not have the "type 4" to be registered as an expense (but it still needs to be in there, to balance the account) So I made this formula for "Sum expenses":
{=SUM(C4:C30)+(IF(A$4:A$30=4;ABS(C$4:C$34);0))}
What this is supposed to do is to take the sum of the expenses, and add whatever is marked with 4 (that is -340+100=240). This doesn't work. I've tried changing it around a bit, and for some reason, the logical test in the IF part never gets "true", even though it "should" . If I simplify:
{=SUM(C4:C30)+(IF(A$4:A$30=4;5;7))}
The value of the cell will always end with a 7, never a 5, which it should if one of the A columns contained a 4.. (assuming, of course that the last digit of the original sum is 0, as in the examples...)
I probably fail to see some logic Excel finds obvious..
Any clue?
PS: I can upload a clean copy of the sheet, if the problem isn't understandable.. I am however using a non-english Excel, do the formulas translate to other versions?
Bookmarks