Arrays inside VLookup

  • Thread starter Thread starter MikeP
  • Start date Start date
M

MikeP

I have a lookup table with dates as the first column (in order). Is
there any way to use an array in a vlookup equation to sum up data that
occurs on consecutive dates? I thought something like the following
would work: {=sum(vlookup(a1:c1,Dataset,5,False))} where a1:c1 refer to
consecutive dates, "dataset" is the name of a range, and 5 is my column
number. But this only gives me the first value, and I want the sum of
all the values. Has anyone solved a similar problem differntly?
 
You can use sumproduct


=SUMPRODUCT(--(INDEX(Dataset,,1)>=A1),--(INDEX(Dataset,,1)<=C1),INDEX(Datase
t,,5))
 
Back
Top