Here is a glimpse into my data set
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Bill[/TD]
[TD]22[/TD]
[TD]$100[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Bill[/TD]
[TD]21[/TD]
[TD]$150[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Tim[/TD]
[TD]23[/TD]
[TD]$1000[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Tim[/TD]
[TD]22[/TD]
[TD]$2000[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Jill[/TD]
[TD]18[/TD]
[TD]$1500[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Jill[/TD]
[TD]17[/TD]
[TD]$900[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Sue[/TD]
[TD]25[/TD]
[TD]$800[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Sue[/TD]
[TD]24[/TD]
[TD]$200[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I'm trying to look up the dollar amount for each person based on that individual's maximum variable in Column B. So for example. I'm trying to do a SUMIF to look up Tim in column A, then looking up the max value for Tim in column B (that would be 23), and then I want to get the dollar amount from Column C that corresponds to that max value. So for my example, that would be $1000. Then I want to reproduce this process but I'm going to want the min value instead of the max for each individual.
My data is currently sorted to group the names together. Once the names are in order, it sorts Column B from high to low.
Currently my formula looks like this to get the greatest value:
=SUMIFS('TimeSheet'!C:C,'TimeSheet'!A:A,"Tim",'TimeSheet'!B:B,"23")
and like this for the minimum value:
=SUMIFS('TimeSheet'!C:C,'TimeSheet'!A:A,"Tim",'TimeSheet'!B:B,23-1)
Is there a way to incorporate a max/min into my SUMIF that will produce the correct answer so I don't have to "hard-code" a number into my formula or a number minus one in the case of wanting the minimum?
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Bill[/TD]
[TD]22[/TD]
[TD]$100[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Bill[/TD]
[TD]21[/TD]
[TD]$150[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Tim[/TD]
[TD]23[/TD]
[TD]$1000[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Tim[/TD]
[TD]22[/TD]
[TD]$2000[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Jill[/TD]
[TD]18[/TD]
[TD]$1500[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Jill[/TD]
[TD]17[/TD]
[TD]$900[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Sue[/TD]
[TD]25[/TD]
[TD]$800[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Sue[/TD]
[TD]24[/TD]
[TD]$200[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I'm trying to look up the dollar amount for each person based on that individual's maximum variable in Column B. So for example. I'm trying to do a SUMIF to look up Tim in column A, then looking up the max value for Tim in column B (that would be 23), and then I want to get the dollar amount from Column C that corresponds to that max value. So for my example, that would be $1000. Then I want to reproduce this process but I'm going to want the min value instead of the max for each individual.
My data is currently sorted to group the names together. Once the names are in order, it sorts Column B from high to low.
Currently my formula looks like this to get the greatest value:
=SUMIFS('TimeSheet'!C:C,'TimeSheet'!A:A,"Tim",'TimeSheet'!B:B,"23")
and like this for the minimum value:
=SUMIFS('TimeSheet'!C:C,'TimeSheet'!A:A,"Tim",'TimeSheet'!B:B,23-1)
Is there a way to incorporate a max/min into my SUMIF that will produce the correct answer so I don't have to "hard-code" a number into my formula or a number minus one in the case of wanting the minimum?