SUMIF & VLOOK Adding values

Gogui

New Member
Joined
Oct 9, 2020
Messages
3
Office Version
  1. 2016
Platform
  1. Windows
Hi All,

I'm trying to add quantities values of a table depending of the category reference and costumer (on this case "A"), but I cant figure it out why I have and error on my formula (#Value!).
Category
Costumer
Qty
1​
A​
70,700
5​
B​
-
3​
A​
21,000
3​
C​
12,136
5​
B​
6,560
1​
A​
6,560

=IF(AND($B$2:$B$1267="A"),SUMIF($A$2:$A$1267,VLOOKUP(A1272,$A$2:$C$1267,1,0),$C$2:$C$1267))

Thanks for your help!, I tryed but I'm stock.
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Try a Pivot Table
Are the numbers in col Qty real numbers or text looking like numbers ( data is left-aligned=text ( if no manual alignment))
 
Upvote 0
Is this what you want?
Book1.xlsm
ABCDEFG
1CategoryCostumerQtyCategoryCustomerQty
21A70,7001A77260
35B-5B6560
43A21,000
53C12,136
65B6,560
71A6,560
Sheet2
Cell Formulas
RangeFormula
G2:G3G2=SUMIFS($C$2:$C$7,$A$2:$A$7,$E2,$B$2:$B$7,$F2)
 
Upvote 0

Forum statistics

Threads
1,223,895
Messages
6,175,257
Members
452,625
Latest member
saadat28

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