evanseabrook
New Member
- Joined
- Dec 18, 2017
- Messages
- 3
I have a table that contains Limits($), Zones and the resulting charge amount.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Limit[/TD]
[TD]$10000[/TD]
[TD]$15000[/TD]
[TD]$20000[/TD]
[TD]$25000[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Zone 1[/TD]
[TD]$10[/TD]
[TD]$20[/TD]
[TD]$30[/TD]
[TD]n/a[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Zone 2[/TD]
[TD]$10[/TD]
[TD]n/a[/TD]
[TD]n/a[/TD]
[TD]n/a[/TD]
[/TR]
</tbody>[/TABLE]
I have the above table. I want to pass in a zone number and a limit amount. If the resulting charge is "n/a", I want to return the charge amount for that zone that isn't "n/a" along with the associated Limit value.
I'm able to return the charge amount for a passed in zone number and limit amount with no problems. I've been playing around with an INDEX MATCH MATCH formula but I'm spinning my wheels.
In the below formula:
T1 contains the limit amount
V1 contains the zone number.
Z1 is the charge amount that is returned when I pass in the zone number and limit amount.
The below formula is for a second column to handle the n/a in sort of a what if scenario.
=INDEX('externaltable'!$B$2:$E$3,MATCH(V1,'externaltable!'$A$2:$A$3),IF(Z1="n/a",MAX('externaltable'!$B$1:$E$1),MATCH(T1,'externaltable'!$B$17:$M$17)))
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Limit[/TD]
[TD]$10000[/TD]
[TD]$15000[/TD]
[TD]$20000[/TD]
[TD]$25000[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Zone 1[/TD]
[TD]$10[/TD]
[TD]$20[/TD]
[TD]$30[/TD]
[TD]n/a[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Zone 2[/TD]
[TD]$10[/TD]
[TD]n/a[/TD]
[TD]n/a[/TD]
[TD]n/a[/TD]
[/TR]
</tbody>[/TABLE]
I have the above table. I want to pass in a zone number and a limit amount. If the resulting charge is "n/a", I want to return the charge amount for that zone that isn't "n/a" along with the associated Limit value.
I'm able to return the charge amount for a passed in zone number and limit amount with no problems. I've been playing around with an INDEX MATCH MATCH formula but I'm spinning my wheels.
In the below formula:
T1 contains the limit amount
V1 contains the zone number.
Z1 is the charge amount that is returned when I pass in the zone number and limit amount.
The below formula is for a second column to handle the n/a in sort of a what if scenario.
=INDEX('externaltable'!$B$2:$E$3,MATCH(V1,'externaltable!'$A$2:$A$3),IF(Z1="n/a",MAX('externaltable'!$B$1:$E$1),MATCH(T1,'externaltable'!$B$17:$M$17)))