Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 254
  • Last Modified:

Using Indirect in Sumif

I am trying to modify a SumIf using "Indirect" to return the the sum of data  that is two rows above the criteria for the sum.   I just can't seem to get it to work.

Sample data attached
EE-Book2.xlsx
0
uad
Asked:
uad
2 Solutions
 
mankowitzCommented:
I'm not sure you want INDIRECT here which returns the values in a range when an address (i.e. "A1:A2") is specified.

Why don't you offset the second reference by two rows, like this

=SUMIF($F$3:$F$22,"t",$D$1:$D$20)

Note that the F column starts at F3, while the D column starts at D1
0
 
MacroShadowCommented:
Enclose the range in double quotes, i.e.
=SUMIF($F$3:$F$22,"t",INDIRECT("$E$1:$E$20"))

Open in new window

0
 
uadAuthor Commented:
Had to split the points, because both solutions worked.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now