return value depending on multiple columns

XFG

New Member
Joined
Jan 19, 2021
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I have a sheet where i need to return a value depending on multiple columns. I want to do this to calculate the efficiency of an installation part. The efficiency of the installation part is calculated per batch. I don't want to average all the batch efficiencies. Attached a photo of the excel table. For simplicity i have three installation parts and all three have an IN and OUT. Every installation part has a different owner. Every owner fills in the table when the analyses are reported, so the table will not be filled in chronological order.

So, for the efficiency of the washer OUT (batch 1) it needs to find the relating washer IN value so i can calculate the efficiency of batch 1 for the washer.
The formula for calculating the efficiency of the washer per batch is as follows:
1 - (washer OUT/washer IN).

Does anyone know how to setup this formula? Do i need helper columns?

If it is not clear yet, please let me know.


Kind regards,
XFG
 

Attachments

  • installation part efficiency.PNG
    installation part efficiency.PNG
    12.6 KB · Views: 21

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Hi XFG,

Does this work for you?

XFG.xlsx
ABCDEFGHI
1InstallClientYWDBatchAntimonyEficResult
2Crusher IN30.33 
3Crusher OUT30.34-3%
4Left leg IN 
5Left leg OUT 
6Washer INRTP201747110.29 
7Washer INRTP201747120.31 
8Washer OUTRTP201747110.31-7%
9Seef IN 
10Seef OUT 
11Washer OUTRTP201747120.33-6%
Sheet1
Cell Formulas
RangeFormula
I2:I11I2=IF(RIGHT(A2,4)<>" OUT","",IFERROR(1-(G2/INDEX($G$2:$G$9999,MATCH(1,INDEX(($A$2:$A$9999=LEFT(A2,SEARCH(" OUT",A2))&"IN")*($F$2:$F$9999=F2),0),0))),""))
 
Upvote 0
Hi Toadstool,

Thank you for the quick reply. This works for me.

However, i see now, i was not clear enough. Besides batch, the returned value should also depend on the client, year, week and day column.
For Crusher IN and Crusher OUT to calculate the efficiency it should only apply the formula below if the client, year, week, day and batch are the same.
formula: 1 - (Crusher OUT/Crusher IN).

Is that possible?
 
Upvote 0
Here is the amended calculation.

Crusher is calculated as client, year, week, day and batch are the same for IN and OUT.
Left leg is not calculated as they're different days.

XFG.xlsx
ABCDEFGHI
1InstallClientYWDBatchAntimonyEficResult
2Crusher INABC201744130.33 
3Crusher OUTABC201744130.34-3%
4Left leg INLLX201746210.55 
5Left leg OUTLLX201746310.44 
6Washer INRTP201747110.29 
7Washer INRTP201747120.31 
8Washer OUTRTP201747110.31-7%
9Seef IN 
10Seef OUT 
11Washer OUTRTP201747120.33-6%
Sheet1 (2)
Cell Formulas
RangeFormula
I2:I11I2=IF(RIGHT(A2,4)<>" OUT","",IFERROR(1-(G2/INDEX($G$2:$G$9999,MATCH(1,INDEX(($A$2:$A$9999=LEFT(A2,SEARCH(" OUT",A2))&"IN")*($F$2:$F$9999=F2)*($B$2:$B$9999=B2)*($C$2:$C$9999=C2)*($D$2:$D$9999=D2)*($E$2:$E$9999=E2),0),0))),""))
 
Upvote 0
Solution
Hi Toadstool,

This is exactly what i want. Thank you very much for the quick solution.

KR, XFG
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,241
Members
452,622
Latest member
Laura_PinksBTHFT

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