Creating 2 lists by extracting unique values but values in each list are based off each other

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?
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,223,247
Messages
6,171,007
Members
452,374
Latest member
keccles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top