Calculate when 1 column has different data

HF85

New Member
Joined
Feb 9, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Here is what I’m trying to do.

If the data in column A and B matches the same data in Column A and B on another row, but the info in column C is different, I want to calculate the percentage between the two rows with data (numbers) in column AE.

Example:
A | B | C
State | County | 2
State | County | 4

Thanks!
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
not enough examples or expected results
% would that be 2/(2+4) so what is the first row as a % of the total - or the difference between the two - (4-2)/(4+2) or - (2-4)/(4+2)
something like
where i have used the 2/(2+4) example
=IFERROR(IF(AND(A1=A2,B1=B2),C1/(C1+C2),""),"")

will there only be 2 rows that match - and always one after the other

Book10
ABCDE
1
2State County 2 
3State County 433%
4State1 County1  
5State2 County212 
6State2 County21446%
7State4 County4 
8State5 County5 
Sheet1
Cell Formulas
RangeFormula
E2:E8E2=IFERROR(IF(AND(A1=A2,B1=B2),C1/(C1+C2),""),"")
 
Upvote 0

Forum statistics

Threads
1,215,092
Messages
6,123,063
Members
449,090
Latest member
fragment

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