Matching categorical data in two columns

bpduggan

New Member
Joined
Jun 22, 2015
Messages
1
I'm trying to compare how water use for a company changed year over year. My data set currently looks like this (with 893 rows):

[TABLE="width: 500"]
<tbody>[TR]
[TD]Name 2011[/TD]
[TD]Water 2011[/TD]
[TD]Name 2014[/TD]
[TD]Water 2014[/TD]
[/TR]
[TR]
[TD]Company A
[/TD]
[TD]110[/TD]
[TD]Company C[/TD]
[TD]100[/TD]
[/TR]
[TR]
[TD]Company C[/TD]
[TD]90[/TD]
[TD]Company B[/TD]
[TD]90[/TD]
[/TR]
[TR]
[TD]Company B[/TD]
[TD]50[/TD]
[TD]Company D[/TD]
[TD]80[/TD]
[/TR]
[TR]
[TD]Company D[/TD]
[TD]40[/TD]
[TD]Company A[/TD]
[TD]70[/TD]
[/TR]
</tbody>[/TABLE]

I've already used the match function to see the relative position of Company A in 2011 to where it is in 2014. But I still can't figure out how to compare the Company A 2011 water value to the Company A 2014 water value. Help please and thank you.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Why not sort the data so that Company A lines up with Company A
Then add a formula


Excel 2007
ABCDE
1Name 2011Water 2011Name 2014Water 2014difference
2Company A110Company A7064%
3Company B50Company B90180%
4Company C90Company C100111%
5Company D40Company D80200%
Sheet1
Cell Formulas
RangeFormula
E2=D2/B2
E3=D3/B3
E4=D4/B4
E5=D5/B5
 
Upvote 0
using column E as a helper to sort A-Z all the companies listed in either A or C provided they are all accounted for you can put in F =(INDEX($A$1:$B$900,MATCH(E2,A:A),2))-INDEX($C$1:$D$900,MATCH(E2,C:C,),2)

HTH ~DR
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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