D
DPR
I'm trying to figure out a way to look up a value using multiple input
arguments. I've tried using the index() function but I can't quite get it to
do what I want. I'm trying to search through an array of electrical
components based on 4 different inputs. My components can be defined by
Type, Phase, Voltage, and Rating. I need to use these variables to find a
value in the next column which is a part number. My array would appear as
follows:
Type Phase Voltage Rating Part number
A 1 120 20 xxxxxx
B 3 240 32 xxxxxx
C 3 240 50 xxxxxx
....
The first three inputs (Type, Phase, and Voltage) should be exact matches,
however the Rating (amps) would most likely not match. I need my function to
return the part number of the component with the next higher rating than my
input. So if I type in that I want a type B, 3-phase, 240 volt, 35 amp
component, it would return the part number for my type B, 3-phase, 240 volt,
50 amp component. Any help would be appreciated. Thanks.
arguments. I've tried using the index() function but I can't quite get it to
do what I want. I'm trying to search through an array of electrical
components based on 4 different inputs. My components can be defined by
Type, Phase, Voltage, and Rating. I need to use these variables to find a
value in the next column which is a part number. My array would appear as
follows:
Type Phase Voltage Rating Part number
A 1 120 20 xxxxxx
B 3 240 32 xxxxxx
C 3 240 50 xxxxxx
....
The first three inputs (Type, Phase, and Voltage) should be exact matches,
however the Rating (amps) would most likely not match. I need my function to
return the part number of the component with the next higher rating than my
input. So if I type in that I want a type B, 3-phase, 240 volt, 35 amp
component, it would return the part number for my type B, 3-phase, 240 volt,
50 amp component. Any help would be appreciated. Thanks.