duglessxott
New Member
Suppose I have this range of string values in cells A1:A10
[pre]
(Notice the lookup value argument is a range rather than a single cell reference - hence the inclination to try it as an array formula). Expectation would be the synthetic array:
{5, 10, 15, 5, 10, 15, 20, 5, 10, 15}[/code]
The goal is to use that resultant array inside of SUMPRODUCT calls that will then selectively add up the elements based on additional filter criteria - the usual stuff for SUMPRODUCT. For example:
{=SUMPRODUCT(--(D1=E1:E10),VLOOKUP(A1:A10,B1:C4,2,FALSE))}
{=SUMPRODUCT(--(D2=E1:E10),VLOOKUP(A1:A10,B1:C4,2,FALSE))}
...
{=SUMPRODUCT(--(D10=E1:E10),VLOOKUP(A1:A10,B1:C4,2,FALSE))}[/code][/pre]
In this case, the first array is the typical filter that (would) inform which of the synthesized array values from this ideal use of VLOOKUP would be added for the sum I want.
My research tends to discover that VLOOKUP is designed to accept arrays for the column index parameter, allowing one to return entire rows out of the lookup table as arrays. My goal is to return an array based on one-to-one mapping of each elements of an array passed as the lookup value parameter.
My expectation is that if it's possible, it will have to be via something more elaborate.
[pre]
Code:
A
B
C
A
B
C
D
A
B
C
and another range for lookups in B1:C4 that maps those values to their numeric equivalents:
[pre][code]A 5
B 10
C 15
D 20[/pre]
Ideally I would like to be able to build an array that maps each entry in A1:A10 into B1:C4, via VLOOKUP, in some array-formula-like manner such as:
[code]{=VLOOKUP(A1:A10,B1:C4,2,FALSE)}
(Notice the lookup value argument is a range rather than a single cell reference - hence the inclination to try it as an array formula). Expectation would be the synthetic array:
{5, 10, 15, 5, 10, 15, 20, 5, 10, 15}[/code]
The goal is to use that resultant array inside of SUMPRODUCT calls that will then selectively add up the elements based on additional filter criteria - the usual stuff for SUMPRODUCT. For example:
{=SUMPRODUCT(--(D1=E1:E10),VLOOKUP(A1:A10,B1:C4,2,FALSE))}
{=SUMPRODUCT(--(D2=E1:E10),VLOOKUP(A1:A10,B1:C4,2,FALSE))}
...
{=SUMPRODUCT(--(D10=E1:E10),VLOOKUP(A1:A10,B1:C4,2,FALSE))}[/code][/pre]
In this case, the first array is the typical filter that (would) inform which of the synthesized array values from this ideal use of VLOOKUP would be added for the sum I want.
My research tends to discover that VLOOKUP is designed to accept arrays for the column index parameter, allowing one to return entire rows out of the lookup table as arrays. My goal is to return an array based on one-to-one mapping of each elements of an array passed as the lookup value parameter.
My expectation is that if it's possible, it will have to be via something more elaborate.