Hi, so say I have this table:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Type[/TD]
[TD]Number[/TD]
[TD]Closest difference (in %)[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]12[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]16[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]22[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]24[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]26[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]42[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I need to fill the third column, so for example in first row it should give me % difference between 12 and 16, in second - same, in third between 22 and 16 etc. I have tough time finding a formula that can find the closest value using the condition type.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Type[/TD]
[TD]Number[/TD]
[TD]Closest difference (in %)[/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]12[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]16[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Apple[/TD]
[TD]22[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]24[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]26[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Banana[/TD]
[TD]42[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I need to fill the third column, so for example in first row it should give me % difference between 12 and 16, in second - same, in third between 22 and 16 etc. I have tough time finding a formula that can find the closest value using the condition type.