Liliquestionsxlxs
New Member
- Joined
- Mar 2, 2022
- Messages
- 17
- Office Version
- 2021
- Platform
- Windows
I need an equation that would find the percent difference of the Ratio column that uses the step name and batch ID as the differentiators.
For example:
% Difference = ((Baseline 2 of Batch 23 - Baseline 1 of Batch 23)/Baseline 1 of Batch 23) =0.245109893
% Difference = ((Ratio 2 of Batch 23 - Ratio 1 of Batch 23)/Ratio 1 of Batch 23) = 0.196243382
% Difference = ((Ratio 2 V/A of Batch 23 - Ratio 1 V/A of Batch 23)/Ratio 1 V/A of Batch 23) = -0.238607548
I would like to have Excel be able to differentiate between each batch ID and using the same batch ID and corresponding step names before doing the calculation. I keep on doing this by hand and would like to not do that anymore.
I want to avoid having to separate all the data into two or more columns to calculate the % difference so no I do not want to create a separate. I would like to be able to have Excel do that calculation automatically and be able to use that same equation on thousands of rows.
I tried this equation but it's adding the data of all the columns so it's not doing what I want it to do.
=IF(LEFT(B3,7)<>"Ratio","",IF(MID(B3,7,1)="1",SUMIFS(C:C,A:A,A3,B:B,B3)-SUMIFS(C:C,A:A,A3,B:B,"Ratio 2"&RIGHT(B3,LEN(B3)-7)),SUMIFS(C:C,A:A,A3,B:B,B3)-SUMIFS(C:C,A:A,A3,B:B,"Ratio 1"&RIGHT(B3,LEN(B3)-7))))