V
vtisix
I am looking for a way to shorten my current sumif formulas. I have two columns, A contains product codes, B contains numeric values, i.e. sales figures. Currently, if I am to add the sales figures for product codes 101, 102, 103, etc.,. I have to use:
=sumif(A1:A1000,"=101",B1:B1000)+sumif(A1:A1000,"=102",B1:B1000)+sumif(A1:A1000,"=103",B1:B1000)+sumif(...)...
As you can see this can get very cumbersome if I am looking to add up multiple products in the same column.
I have tried named range, i.e. Product ={"=101","=102","=103"} and insert name into formula =sumif(A1:A1000,Product,B1:B1000) and Ctrl+Shift+Enter to activate the array function...but nothing...the formula just picks up the first item 101 in the named range.
Another approach, I thought, was to use the SUMPRODUCT formula, and so went:
=SUMPRODUCT(--(A1:A1000="=101"),--(A1:A1000="=102"),--(A1:A1000="=103"),B1:B1000)...still nada!
This has been driving me bonkers for the last few days, I have tried a bunch of variations of the SUMIF and SUMPRODUCT formulas and can't think of anything else to try.
As you would've guessed, ANY help in the right direction is MUCH appreciated.
Regards,
VT
=sumif(A1:A1000,"=101",B1:B1000)+sumif(A1:A1000,"=102",B1:B1000)+sumif(A1:A1000,"=103",B1:B1000)+sumif(...)...
As you can see this can get very cumbersome if I am looking to add up multiple products in the same column.
I have tried named range, i.e. Product ={"=101","=102","=103"} and insert name into formula =sumif(A1:A1000,Product,B1:B1000) and Ctrl+Shift+Enter to activate the array function...but nothing...the formula just picks up the first item 101 in the named range.
Another approach, I thought, was to use the SUMPRODUCT formula, and so went:
=SUMPRODUCT(--(A1:A1000="=101"),--(A1:A1000="=102"),--(A1:A1000="=103"),B1:B1000)...still nada!
This has been driving me bonkers for the last few days, I have tried a bunch of variations of the SUMIF and SUMPRODUCT formulas and can't think of anything else to try.
As you would've guessed, ANY help in the right direction is MUCH appreciated.
Regards,
VT