Zacharygolf
New Member
- Joined
- Jul 15, 2013
- Messages
- 4
Title may be a little confusing, I apologize. I have expense reports that contain multiple cost codes, job numbers, and expenses. What I want are 3 columns: a list of cost codes, a list of job numbers, and a $ total. I also want this list to e self propagating, meaning that I do not have to edit the formulas for they to work.
[TABLE="width: 448"]
<colgroup><col width="64" span="7" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]Cost[/TD]
[TD="width: 64"]Job #[/TD]
[TD="width: 64"]Acct #[/TD]
[TD="width: 64"][/TD]
[TD="width: 64"]Acct #[/TD]
[TD="width: 64"]Job #[/TD]
[TD="width: 64"]Total[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]$1.00[/TD]
[TD="align: right"]123[/TD]
[TD="align: right"]789[/TD]
[TD][/TD]
[TD="align: right"]789[/TD]
[TD="align: right"]123[/TD]
[TD="class: xl63, align: right"]$1.00[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]$3.00[/TD]
[TD="align: right"]123[/TD]
[TD="align: right"]910[/TD]
[TD][/TD]
[TD="align: right"]789[/TD]
[TD="align: right"]456[/TD]
[TD="class: xl63, align: right"]$12.00[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]$5.00[/TD]
[TD="align: right"]456[/TD]
[TD="align: right"]789[/TD]
[TD][/TD]
[TD="align: right"]910[/TD]
[TD="align: right"]123[/TD]
[TD="class: xl63, align: right"]$3.00[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]$7.00[/TD]
[TD="align: right"]456[/TD]
[TD="align: right"]789[/TD]
[TD][/TD]
[TD="align: right"]910[/TD]
[TD="align: right"]456[/TD]
[TD="class: xl63, align: right"]$9.00[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]$9.00[/TD]
[TD="align: right"]456[/TD]
[TD="align: right"]910[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
On the left is my test data, on the right is what I want to appear. So far I am able to extract the unique values and make them into a list using this formula(in cell A9):
{=INDEX($C$2:$C$6,MATCH(0,COUNTIF($A$8:A8,$C$2:$C$6),0))}
[TABLE="width: 64"]
<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64, align: right"]789[/TD]
[/TR]
[TR]
[TD="align: right"]910[/TD]
[/TR]
</tbody>[/TABLE]
And I figured that using COUNTIFS( would do the trick but I can't get the formula to work properly. Any Help?
[TABLE="width: 448"]
<colgroup><col width="64" span="7" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]Cost[/TD]
[TD="width: 64"]Job #[/TD]
[TD="width: 64"]Acct #[/TD]
[TD="width: 64"][/TD]
[TD="width: 64"]Acct #[/TD]
[TD="width: 64"]Job #[/TD]
[TD="width: 64"]Total[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]$1.00[/TD]
[TD="align: right"]123[/TD]
[TD="align: right"]789[/TD]
[TD][/TD]
[TD="align: right"]789[/TD]
[TD="align: right"]123[/TD]
[TD="class: xl63, align: right"]$1.00[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]$3.00[/TD]
[TD="align: right"]123[/TD]
[TD="align: right"]910[/TD]
[TD][/TD]
[TD="align: right"]789[/TD]
[TD="align: right"]456[/TD]
[TD="class: xl63, align: right"]$12.00[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]$5.00[/TD]
[TD="align: right"]456[/TD]
[TD="align: right"]789[/TD]
[TD][/TD]
[TD="align: right"]910[/TD]
[TD="align: right"]123[/TD]
[TD="class: xl63, align: right"]$3.00[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]$7.00[/TD]
[TD="align: right"]456[/TD]
[TD="align: right"]789[/TD]
[TD][/TD]
[TD="align: right"]910[/TD]
[TD="align: right"]456[/TD]
[TD="class: xl63, align: right"]$9.00[/TD]
[/TR]
[TR]
[TD="class: xl63, align: right"]$9.00[/TD]
[TD="align: right"]456[/TD]
[TD="align: right"]910[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
On the left is my test data, on the right is what I want to appear. So far I am able to extract the unique values and make them into a list using this formula(in cell A9):
{=INDEX($C$2:$C$6,MATCH(0,COUNTIF($A$8:A8,$C$2:$C$6),0))}
[TABLE="width: 64"]
<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64, align: right"]789[/TD]
[/TR]
[TR]
[TD="align: right"]910[/TD]
[/TR]
</tbody>[/TABLE]
And I figured that using COUNTIFS( would do the trick but I can't get the formula to work properly. Any Help?