Forum Discussion
Colin59
Jul 29, 2022Copper Contributor
How to calculate sum of one column based on a vlookup of another column's values?
Hi, I am trying to find a way to calculate the sum of values in column B based on the value of cells in column A, as in the attached file. So how many of each T-Shirt size are in columns A + B.
I have tried to use B20=SUMIF(A20:A24;(VLOOKUP(A20;A2:B16;2;FALSE);B2:B16)) but this throws an error.
Any suggestions will be welcomed!
2 Replies
Sort By
- OliverScheurichGold Contributor
- Colin59Copper Contributor
This works! Strange things happen when you have two excel files open and you copy from one to the other (cross-references the file that you copy from).
Many thanks