Sumproduct + transpose + max

moccasinus

New Member
Joined
Aug 8, 2017
Messages
30
Office Version
  1. 365
Platform
  1. Windows
Hi, is there a way to modify formula {=SUMPRODUCT(Sheet2!K$2:K$242;TRANSPOSE($B38:$IH38))} for it not to multiply all together, but to return maximum value from array Sheet2!K$2:K$242?
Been trying various ways, multiple criteria index match etc., but none seem to work
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
I am a bit confused. I am not sure where the SUMPRODUCT and TRANSPOSE come in.
If you just want the max of the range Sheet2!K$2:K$242, why wouldn't you just use the MAX function?

Maybe it would be more helpful if you post a data sample, and show us your expected result.
 
Upvote 0
Further to what Joe has asked, what version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Hi, thanks for your replies. I'm usind office 365, platform windows. Hope this clarifies my previous question:
The transpose is to convert from horizontal to vertical data, and sumproduct to multiply all values. I use that for other calculations.
Here, in the pictures I've posted I need to get the maximum value of ProductX in Sheet2!K2:K242 multiplied by the number of corresponding ProductX in TRANSPOSE(B38:IH38).
By using {=SUMPRODUCT(Sheet2!K$2:K$242;TRANSPOSE($B38:$IH38))} I get sum of all the Products, but I only need the one that is maximum
 

Attachments

  • TRANSPOSE B38 IH38.JPG
    TRANSPOSE B38 IH38.JPG
    90.3 KB · Views: 7
  • Sheet2 K2 K242.JPG
    Sheet2 K2 K242.JPG
    51.8 KB · Views: 8
Upvote 0
Thanks for that.
However it's still not entirely clear to me what you want, but maybe
Excel Formula:
=MAX(Sheet2!K$2:K$242*TRANSPOSE($B38:$IH38))
 
Upvote 0
Notice, that same Products are vertical in one sheet, and horizontal in the other.
In order to get whole sum for it all I use {=SUMPRODUCT(Sheet2!K$2:K$242;TRANSPOSE($B38:$IH38))}
Problems start when I want to find the maximum value in Sheet2!K$2:K$242 and the sumproduct it with TRANSPOSE($B38:$IH38)
I've thought the most logic way would be adding max in front of Sheet2!K$2:K$242, like so: {=SUMPRODUCT(MAX(Sheet2!K$2:K$242);TRANSPOSE($B38:$IH38))}
But then that part of the formula only returns one value, but for sumproduct it has the be the exact number of cells or values as in TRANSPOSE($B38:$IH38)
It is very likely that I need to use something else, not sumproduct, for the formula to multiply the corresponding value by the MAX(Sheet2!K$2:K$242)
Hope I've made myself clearer ?
 
Upvote 0
Did you try the formula I suggested?
 
Upvote 0
Yup, #value.
I've tried some variations of index match with multiple criteria as well, couldn't get anything either
 
Upvote 0
Do you have any #NUM errors in either set of data?
 
Upvote 0

Forum statistics

Threads
1,215,575
Messages
6,125,618
Members
449,238
Latest member
wcbyers

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top