Vlookup & sum of multiple sales in various columns

peterECD

New Member
Joined
Jun 6, 2016
Messages
8
Hi,
Need a solution for the following please;
1. Search a product from a product list a-z in a product tab
2. Find all sales for this product in the Sales Tab in the same sheet.
3. Sales for products have multiple entries (quantities) in columns E, H, K, N, Q...etc every 3rd column.
4 Add all sales by product and return a total next to the product in the product tab.

Ive tried SUMIF and sum(VLOOKUP) but cant get a solution.

Hoep someone can assist please!
Thanks
Peter
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
"Sales for products have multiple entries (quantities) in columns E, H, K, N, Q...etc every 3rd column."
So sales for a product go horizontally.

Can a product code appear more than once in the Sales tab, e.g.

Code:
                   Sales
Shirts             3     11     12     9
Trousers           2     14
Shirts             6     5
 
Last edited:
Upvote 0
Hi,
Yes it can. The product appears in multiple columns eg Columns 1(C),4(F),7(I),10(L),13(O) etc and the quantity associated with that product is in columns 3(E), 6(H), 9(K), 12(N), Q...etc every 3rd column.

For example;
Shirts 3 Trousers 12 Shirts 9
Trousers 2 Shirts 14 Belts 8
Shirts 6 Belts 5
Belts 4

Show Total sales on the Product tab;
Shirts 32
Trousers 14
Belts 17
etc
Thanks hope this is clearer.
 
Upvote 0
Not sure I have the concept and it doesn't sound like SUMIF or VLOOKUP are the tools for the job.

Try in B2 and filled down
Code:
=SUM(INDEX($C$2:$O$11,,MATCH($A2,$C$1:$O$1,0)))
Can you adapt this to your tabs?



A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
1
Shirts​
Trousers​
Belts​
Shoes​
Hats​
2
Shirts​
77​
6​
6​
7​
10​
6​
3
Trousers​
61​
11​
13​
10​
11​
6​
4
Belts​
87​
7​
3​
8​
5​
0​
5
Shoes​
92​
12​
0​
14​
10​
1​
6
Hats​
48​
8​
10​
13​
11​
3​
7
9​
0​
5​
7​
9​
8
0​
9​
9​
13​
6​
9
11​
7​
9​
8​
0​
10
13​
7​
6​
6​
9​
11
0​
6​
6​
11​
8​
 
Last edited:
Upvote 0
Hi
Ive worked how how to insert my files'
Heres the Product Tab;
Excel 2010
AB
1ItemsQTY
2144XT
3145SJ
4145SS
514DI
614JF
714RS
814SE
914SI2
1014SW1
1114SWD
1214SWE
1314SWS
14151PJ
15151PM
16151PS
17151SJR
18151SS
19151SS3
20151SS4
21151SS5

<tbody>
</tbody>
Items



Heres is the SAles Tab;
Item1, Item 2 etc are the products, Total per Kit 1 are the sales by item;
Excel 2010
ABCDEFGHIJKLMN
1Qty InvoicedKit Reporting CodeItem 1QtyTotal per Kit 1Item 2QtyTotal per Kit 2Item 3QtyTotal per Kit 3Item 4QtyTotal per Kit 4
224VB10k 24VB100000
324VF10k 24VF100000
424VG10k 24VG100000
524VO10k 24VO100000
624VR10k 24VR100000
724VRGY10k 24VRGY100000
824VRGYS10k 24VRGYS100000
924VRRB10k 24VRRB100000
1024VRRBS10k 24VRRBS100000
1124VY10k 24VY100000
121143AHBk 40AR66640AY666401A6660
131243BB3k 181N31012064MS11200
143243BB5k 181N51032064MS13200
151343BB5Ck 181N5C1013064MS11300
16143BB6k 181N6101064MJ1100
17743BB6Ck 181N6C107064MJ1700
18443BB7k 181N7104064MJ1400
19443BB7Ck 181N7C104064MJ1400
201143BBLk 28BBC11128BBL11128BBN11128BBN11111

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Kits Invoiced
Hope this makes more sense mow.
 
Upvote 0
No I am not making sense of this. I am not seeing the connections between the Product tab and sales tab. I see nothing in common between the 2 ... no items match.
 
Last edited:
Upvote 0
Sorry, hope I can define this better;
The product tab is the summary of sales by product in the full spreadsheet on Sales Tab(kits invoiced);
Here is a grab of the product list from the product tab, for example 64MS is shown in the sales spreadsheet in row F, but could also be anywhere in the sheet. So the formula needs to search for every entry which may exist in this sales tab and total the qty sold.
Excel 2010
A
21064CBT
21164CBTL
21264CBTX
21364FBC
21464HC
21564MJ
21664MS
21764MSS
21864SL
21964SS
22065A
22165AD
22266KB
223671B
224673B
225673C
226691YB
227691YG
228691YR

<colgroup><col style="width: 25pxpx"><col></colgroup><thead>
</thead><tbody>
</tbody>
Items
 
Upvote 0
Referencing the Sales tab posted in Post #5 and using the most recent Product list Post #7


Q
R
S
1
Product​
Sums​
2
64CBT​
0​
In R2: =SUMIF($C$2:$L$20,Q2,$E$2:$N$20)​
3
64CBTL​
0​
4
64CBTX​
0​
5
64FBC​
0​
6
64HC​
0​
7
64MJ​
16​
8
64MS​
57​
9
64MSS​
0​
10
64SL​
0​
11
64SS​
0​
12
65A​
0​
13
65AD​
0​
14
66KB​
0​
15
671B​
0​
16
673B​
0​
17
673C​
0​
18
691YB​
0​
19
691YG​
0​
20
691YR​
0​
 
Upvote 0

Forum statistics

Threads
1,215,216
Messages
6,123,669
Members
449,114
Latest member
aides

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