Sales for multiple products in 1 Cell

bilal_aoun

New Member
Joined
May 3, 2021
Messages
25
Office Version
  1. 2016
Platform
  1. Windows
Would you please help me find the sale in a single cell?
Sales per day in cells B2:H9
Product type A5:A9
Product Price
B16:C21

If we are to transpose the date in cells E17:E24, can we find the total sales in dollar in F18:F24?
1620077205704.png
 

Attachments

  • 1620076952849.png
    1620076952849.png
    36.3 KB · Views: 5

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
No need to transpose if you use the correct formula.
Excel Formula:
=SUM(INDEX($B$5:$H$9,0,MATCH(E18,$B$4:$H$4,0)))
 
Upvote 0
Thanks Jason! I had to Transpose to make the dataset Tableau Friendly :)
 
Upvote 0
Sorry, ignore that remark, I misread 'date' as 'data' and thought you were trying to transpose everything.

If you enter the formula into F18 then fill down it will do as you need. Depending on your regional settings, you may need to change the commas to semicolons.
 
Upvote 0
T
Sorry, ignore that remark, I misread 'date' as 'data' and thought you were trying to transpose everything.

If you enter the formula into F18 then fill down it will do as you need. Depending on your regional settings, you may need to change the commas to semicolons
This formula would give me the sales in units; however, I am trying to get the sales in dollar using the price table in B16:C21
Thanks,
 
Upvote 0
I see what you mean now, that would need to be transposed. Possibly this formula will need to be array confirmed with Ctrl Shift Enter.
Excel Formula:
=SUMPRODUCT(INDEX($B$5:$H$9,0,MATCH(E18,$B$4:$H$4,0))*($A$5:$A$9=TRANSPOSE($B$17:$B$21))*$C$17:$C$21)
Because the 2 product lists, A5:A9 and B17:B21 are identical (same products and same order) you could do it without the transposed criteria but it would be at the risk or incorrect results if future changes meant that they no longer matched.
 
Upvote 0
Solution
I see what you mean now, that would need to be transposed. Possibly this formula will need to be array confirmed with Ctrl Shift Enter.
Excel Formula:
=SUMPRODUCT(INDEX($B$5:$H$9,0,MATCH(E18,$B$4:$H$4,0))*($A$5:$A$9=TRANSPOSE($B$17:$B$21))*$C$17:$C$21)
Because the 2 product lists, A5:A9 and B17:B21 are identical (same products and same order) you could do it without the transposed criteria but it would be at the risk or incorrect results if future changes meant that they no longer matched.
So the formula will not do the correct calculation if the price table is sorted differently, and will #N/A if the range is extended :)
 
Upvote 0
=SUMPRODUCT(INDEX($B$5:$H$9,0,MATCH(E18,$B$4:$H$4,0))*($A$5:$A$9=TRANSPOSE($B$17:$B$21))*$C$17:$C$21)
So the formula will not do the correct calculation if the price table is sorted differently, and will #N/A if the range is extended
 
Upvote 0

Forum statistics

Threads
1,215,529
Messages
6,125,344
Members
449,219
Latest member
Smiqer

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