Hello,
I'm trying to make a countif / sumif formula which would look into variable row/column based on match function.
I have a table containing ID of a customer and count of drinks he/she has consumed in a period in a Sheet named AV Pivot.
<tbody>
</tbody>
I want to create a separate sheet which will look like this:
<tbody>
</tbody>
I need a formula which will have the same output as if I wrote:
=SUMIF('AV Pivot'!$1:$1,"="&A4,'AV Pivot'!4:4)
but sum range should be variable based on row in which the ID (found in B1) was found in the source table (Match function can pull row number but I do not know if there is way to create variable array based on result of the match function). I know how I would fix it in VBA but I need macro free workbook.
Thanks in advance!
I'm trying to make a countif / sumif formula which would look into variable row/column based on match function.
I have a table containing ID of a customer and count of drinks he/she has consumed in a period in a Sheet named AV Pivot.
A | B | C | D | E | F | G | H | I | |
1 | ID | Juice | Juice | Beer | Wine | Juice | Whiskey | Wine | Beer |
2 | 12345 | 1 | 2 | 1 | 0 | 1 | 0 | 0 | 0 |
3 | 23456 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 |
4 | 34567 | 2 | 0 | 1 | 6 | 0 | 2 | 1 | 0 |
<tbody>
</tbody>
I want to create a separate sheet which will look like this:
A | B | C | |
1 | Customer ID | 34567 | |
2 | |||
3 | Drink type | Sum | |
4 | Juice | FORMULA HERE | |
5 | Wine | ||
6 | Whiskey | ||
7 | Beer |
<tbody>
</tbody>
I need a formula which will have the same output as if I wrote:
=SUMIF('AV Pivot'!$1:$1,"="&A4,'AV Pivot'!4:4)
but sum range should be variable based on row in which the ID (found in B1) was found in the source table (Match function can pull row number but I do not know if there is way to create variable array based on result of the match function). I know how I would fix it in VBA but I need macro free workbook.
Thanks in advance!