brodprocan
New Member
- Joined
- Apr 23, 2017
- Messages
- 6
Hello all,
I'm brand new to this forum (in terms of posting), as I can usually find the answers to my questions by searching other people's posts. But not this time, so I'm hoping somebody can help.
I'm trying to combine the SUMIF and MIN functions, but can't get it to work. As an example of what I want to achieve, see the worksheet below. I have rows of products, and columns of suppliers. Some of the products are supplied by various suppliers, although at different prices. I've used the MIN function in conditional formatting to highlight the cheapest price for each product (i.e. in each row):
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Item to be purchased[/TD]
[TD="align: center"]Supplier A[/TD]
[TD="align: center"]Supplier B[/TD]
[TD="align: center"]Supplier C[/TD]
[TD="align: center"]Supplier D[/TD]
[/TR]
[TR]
[TD]Product A[/TD]
[TD="align: center"]$10.00[/TD]
[TD="align: center"]$12.00[/TD]
[TD="align: center"]$15.00[/TD]
[TD="align: center"]$14.00[/TD]
[/TR]
[TR]
[TD]Product B[/TD]
[TD="align: center"]$25.00[/TD]
[TD="align: center"]$22.00[/TD]
[TD="align: center"]$28.00[/TD]
[TD="align: center"]$26.00[/TD]
[/TR]
[TR]
[TD]Product C[/TD]
[TD="align: center"]$35.00[/TD]
[TD="align: center"]$34.00[/TD]
[TD="align: center"]$32.00[/TD]
[TD="align: center"]$40.00[/TD]
[/TR]
[TR]
[TD]Product D[/TD]
[TD="align: center"]$28.00[/TD]
[TD="align: center"]$30.00[/TD]
[TD="align: center"]$31.00[/TD]
[TD="align: center"]$32.00[/TD]
[/TR]
[TR]
[TD]Product E[/TD]
[TD="align: center"]$55.00[/TD]
[TD="align: center"]$54.00[/TD]
[TD="align: center"]$56.00[/TD]
[TD="align: center"]$53.00[/TD]
[/TR]
[TR]
[TD]Total spend per supplier[/TD]
[TD="align: center"]SUMIF (Lowest price)[/TD]
[TD="align: center"]SUMIF (Lowest price)[/TD]
[TD="align: center"]SUMIF (Lowest price)[/TD]
[TD="align: center"]SUMIF (Lowest price)[/TD]
[/TR]
</tbody>[/TABLE]
This is a simplified version, my actual spreadsheet is much bigger, but what I want to do is SUM only the lowest prices under each supplier. I've tried combining the SUMIF and the MIN function in various ways, but I keep getting a zero, or a #VALUE error. Is this because the SUMIF is working down the column while the MIN is working across each row? Is there a better way to do this? With formulas preferably, I'd rather not get into VBA.
Thanks in advance,
I'm brand new to this forum (in terms of posting), as I can usually find the answers to my questions by searching other people's posts. But not this time, so I'm hoping somebody can help.
I'm trying to combine the SUMIF and MIN functions, but can't get it to work. As an example of what I want to achieve, see the worksheet below. I have rows of products, and columns of suppliers. Some of the products are supplied by various suppliers, although at different prices. I've used the MIN function in conditional formatting to highlight the cheapest price for each product (i.e. in each row):
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Item to be purchased[/TD]
[TD="align: center"]Supplier A[/TD]
[TD="align: center"]Supplier B[/TD]
[TD="align: center"]Supplier C[/TD]
[TD="align: center"]Supplier D[/TD]
[/TR]
[TR]
[TD]Product A[/TD]
[TD="align: center"]$10.00[/TD]
[TD="align: center"]$12.00[/TD]
[TD="align: center"]$15.00[/TD]
[TD="align: center"]$14.00[/TD]
[/TR]
[TR]
[TD]Product B[/TD]
[TD="align: center"]$25.00[/TD]
[TD="align: center"]$22.00[/TD]
[TD="align: center"]$28.00[/TD]
[TD="align: center"]$26.00[/TD]
[/TR]
[TR]
[TD]Product C[/TD]
[TD="align: center"]$35.00[/TD]
[TD="align: center"]$34.00[/TD]
[TD="align: center"]$32.00[/TD]
[TD="align: center"]$40.00[/TD]
[/TR]
[TR]
[TD]Product D[/TD]
[TD="align: center"]$28.00[/TD]
[TD="align: center"]$30.00[/TD]
[TD="align: center"]$31.00[/TD]
[TD="align: center"]$32.00[/TD]
[/TR]
[TR]
[TD]Product E[/TD]
[TD="align: center"]$55.00[/TD]
[TD="align: center"]$54.00[/TD]
[TD="align: center"]$56.00[/TD]
[TD="align: center"]$53.00[/TD]
[/TR]
[TR]
[TD]Total spend per supplier[/TD]
[TD="align: center"]SUMIF (Lowest price)[/TD]
[TD="align: center"]SUMIF (Lowest price)[/TD]
[TD="align: center"]SUMIF (Lowest price)[/TD]
[TD="align: center"]SUMIF (Lowest price)[/TD]
[/TR]
</tbody>[/TABLE]
This is a simplified version, my actual spreadsheet is much bigger, but what I want to do is SUM only the lowest prices under each supplier. I've tried combining the SUMIF and the MIN function in various ways, but I keep getting a zero, or a #VALUE error. Is this because the SUMIF is working down the column while the MIN is working across each row? Is there a better way to do this? With formulas preferably, I'd rather not get into VBA.
Thanks in advance,