Sales for multiple products in 1 Cell (to account for table order and #N/A)

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




=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)

Now I am trying to make this more dynamic (not impacted by NA or the order in B17:C21
 
I would like to extended the range for the future ( The table will have blanks which will cause an error )
There are no errors in what I posted in post#8 despite the fact I have extended the ranges beyond the data.
 
Upvote 0

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
1321806_iPhone_Feedback_Template_20210426_005513.xlsx
ABCDEFGH
43/28/20214/4/20214/11/20214/18/20214/25/20215/2/20215/9/2021
5Apple 26910253
6Orange1362824
7Cherry1035621
8Water23011011
9Juice10002380
10
11
12
13
14
15
16ProductPrice
17Juice$ 5.00DateTotal Sale
18Orange$ 2.003/28/2021#N/A
19Cherry$ 3.004/4/2021#N/A
20Water$ 4.004/11/2021#N/A
21Apple$ 1.004/18/2021#N/A
224/25/2021#N/A
235/2/2021#N/A
245/9/2021#N/A
Sheet2
Cell Formulas
RangeFormula
F18:F24F18=SUMPRODUCT(INDEX($B$5:$H$14,0,MATCH(E18,$B$4:$H$4,0))*($A$5:$A$14=TRANSPOSE($B$17:$B$31))*$C$17:$C$31)
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
That is not the formula that I suggested.
 
Upvote 0
1321806_iPhone_Feedback_Template_20210426_005513.xlsx
ABCDEFGH
1
2
3
43/28/20214/4/20214/11/20214/18/20214/25/20215/2/20215/9/2021
5Apple 26910253
6Orange1362824
7Cherry1035621
8Water23011011
9Juice10002380
10
11
12
13
14
15
16ProductPrice
17Juice$ 5.00DateTotal Sale
18Orange$ 2.003/28/2021147
19Cherry$ 3.004/4/20216
20Water$ 4.004/11/202125
21Apple$ 1.004/18/202133
224/25/202149
235/2/202154
245/9/202115
25
Sheet2
Cell Formulas
RangeFormula
F18:F24F18=SUMPRODUCT(INDEX($B$5:$J$10,0,MATCH(E18,$B$4:$J$4,0))*($A$5:$A$10=TRANSPOSE($B$17:$B$31))*TRANSPOSE($C$17:$C$31))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Chacek that you don't have any leading/trailing spaces on the "products"
 
Upvote 0
You sure? From the results you get compared to mine it looks as though it's not counting Apple.
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,582
Members
449,089
Latest member
Motoracer88

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