G
Guest
using a table such as:
Country V1 V2 V3 V4
C1 P1 P2 P3 P4
C2 P1 P2 P3 P4
I need to be able to find the lowest TWO values of "P" for each row "C" and
return the "P" value AS WELL AS its corresponding "V" value. Is there an
easy way to do this and keep it as dynamic as possible (not hardcode the "V"
or "C" values)?
For example, for C1, the lowest two rates might be P4/V4, followed by P2/V2
whereas, for C2, the ranking might be P1/V1, followed by P3/V3. I just want
to see a result set with:
C1 V4 P4 V2 P2
C2 V1 P1 V3 P3
if it's of any value, in excel, I can use:
=INDEX(activevendors,MATCH(E2,$AI2:$AY2,0)) to get the V (Vendor) value and
=SMALL($AI2:$AY2,1) (changing ,1 to be the rank I'm looking for) to get the
P (Price) value.
Country V1 V2 V3 V4
C1 P1 P2 P3 P4
C2 P1 P2 P3 P4
I need to be able to find the lowest TWO values of "P" for each row "C" and
return the "P" value AS WELL AS its corresponding "V" value. Is there an
easy way to do this and keep it as dynamic as possible (not hardcode the "V"
or "C" values)?
For example, for C1, the lowest two rates might be P4/V4, followed by P2/V2
whereas, for C2, the ranking might be P1/V1, followed by P3/V3. I just want
to see a result set with:
C1 V4 P4 V2 P2
C2 V1 P1 V3 P3
if it's of any value, in excel, I can use:
=INDEX(activevendors,MATCH(E2,$AI2:$AY2,0)) to get the V (Vendor) value and
=SMALL($AI2:$AY2,1) (changing ,1 to be the rank I'm looking for) to get the
P (Price) value.