Hey guys,
I am trying to make a project where I have a spreadsheet with 3 sheets:
database with 3 column: A = date, B=Product, C = Price like this:
<tbody>
</tbody>
Sheet 2 (chart) where I want the formula, I can manualy change year on B2, select quality on dropbdown list which is being taken from defined name on sheet 3, and results from C2 through E#.
<tbody>
</tbody>
Sheet 3 (qualities) = unique names of all products for the dropdown list.
I am trying to get the average price of X product sold on month and year, at the moment I was only able to get the price of the product on the day with the formula:
<code style="margin: 0px; padding: 0px; font-style: inherit; line-height: 12px;">=AVERAGE((MONTH(tbl_date)=$A2)*(YEAR(tbl_date)=$B$1)*(tbl_product=C$1)*tbl_price)</code>
I don't really get the average sale of that product, but a very different number, - I guess it's the average of this to the whole table... can someone please help?
Attached is a example of the sheet.
Appreciate any help, not sure if I can upload the excel or not, but I tried to explain my problem as detailed as I could
PS: A PivotTable would not work so well, I have over 50 products, and it would be an enormous thing, and I want to be able to check price of one product with another and make a easy chart
I am trying to make a project where I have a spreadsheet with 3 sheets:
database with 3 column: A = date, B=Product, C = Price like this:
A | B | C | |
1 | Sales date (tbl_date) | Product (tbl_product) | Price (tbl_price) |
2 | January 5, 2010 | 17/18 FC | +20 |
3 | January 6, 2010 | 17/18 FC | +18 |
<tbody>
</tbody>
Sheet 2 (chart) where I want the formula, I can manualy change year on B2, select quality on dropbdown list which is being taken from defined name on sheet 3, and results from C2 through E#.
A | B | C | D | E | |
1 | Year | 2012 | 17/18 FC | dropdown 2 | dropdown 3 |
2 | 1 | January | 19 (for instance) | Avg result | Avg result |
3 | 2 | February | Avg result | Avg result | Avg result |
<tbody>
</tbody>
Sheet 3 (qualities) = unique names of all products for the dropdown list.
I am trying to get the average price of X product sold on month and year, at the moment I was only able to get the price of the product on the day with the formula:
<code style="margin: 0px; padding: 0px; font-style: inherit; line-height: 12px;">=AVERAGE((MONTH(tbl_date)=$A2)*(YEAR(tbl_date)=$B$1)*(tbl_product=C$1)*tbl_price)</code>
I don't really get the average sale of that product, but a very different number, - I guess it's the average of this to the whole table... can someone please help?
Attached is a example of the sheet.
Appreciate any help, not sure if I can upload the excel or not, but I tried to explain my problem as detailed as I could
PS: A PivotTable would not work so well, I have over 50 products, and it would be an enormous thing, and I want to be able to check price of one product with another and make a easy chart
Last edited: