jdbwizzard
New Member
- Joined
- Aug 15, 2014
- Messages
- 2
Hello,
I am trying to work out a formula for the example spreadsheet below.
<tbody>
</tbody>
I am trying to write a if statment that says if the category is 1 add to the category 1 total, if the category is 2 add to the category 2 total and so on.
So far this is what I came up with:
=IF(C2=1,B2+C7,IF(C2=2,B2+C8,IF(C2=3,B2+C9,B2+C10)))
But this only pulls from one cell. Thanks in advance for any help.
I am trying to work out a formula for the example spreadsheet below.
Item | Cost | Category |
Kroger | 100 | 2 |
Gas | 50 | 3 |
Movies | 35 | 4 |
Phone Bill | 170 | 1 |
Category 1 Total | ? | |
Category 2 Total | ? | |
Category 3 Total | ? | |
Category 4 Total | ? |
<tbody>
</tbody>
I am trying to write a if statment that says if the category is 1 add to the category 1 total, if the category is 2 add to the category 2 total and so on.
So far this is what I came up with:
=IF(C2=1,B2+C7,IF(C2=2,B2+C8,IF(C2=3,B2+C9,B2+C10)))
But this only pulls from one cell. Thanks in advance for any help.