Formula to find correct input and output

truxor

New Member
Joined
Nov 22, 2011
Messages
7
Morning,

I have a range of cells that show the inputs and outputs by steps.


What I want the formula to do is grab the first input given and then grab the last output from the range.


The problem I have is that the process of the output may vary depending on which process it went through, that's where I am having trouble automating it.


An example:


[TABLE="width: 270"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD] [/TD]
[TD]Input[/TD]
[TD]Output A[/TD]
[TD] Output B[/TD]
[/TR]
[TR]
[TD]Step A[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Step B[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]35[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Step C[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]30[/TD]
[/TR]
</tbody>[/TABLE]



I don't want to put a total at the bottom for all since the output, Step C, was the actual
amount in the process. What I want is Step C Output (30) and Step A (100)
divided into each other - 30%.


How can I logically make the formula work? I have tried IFS, but getting stuck.


Also not all processes will finish with Step C, it may finish with Step A or B. I want it
to logically find the correct Input/Output.



[TABLE="width: 270"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD] [/TD]
[TD]Input[/TD]
[TD]Output A[/TD]
[TD]Output B[/TD]
[/TR]
[TR]
[TD]Step A[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD]Step B[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]35[/TD]
[TD="align: right"]0[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Forum statistics

Threads
1,225,229
Messages
6,183,730
Members
453,185
Latest member
radiantclassy

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