# Sumif function

Hi!

I need to sum up values in Sheet 2 column B based on the data that is in Sheet 1.

Please refer to the attached file.

thx
SumIf-formula.xlsx
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

EngineerCommented:
Try this ARRAY formula

=SUM(IF(ISNA(MATCH(A2:A24,Sheet1!\$A\$2:\$A\$7,0)),0,Sheet2!B2:B24))
0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Author Commented:
no it did not work...it just gave me Total value for column B in sheet 2. Please see the attached file.
SumIf-formula.xlsx
0
Commented:
You need to enter that formula by ctrl+shift+enter..

Alternatively you can simply enter this formula...

=SUMPRODUCT(ISNUMBER(MATCH(Sheet2!A\$2:A\$24,Sheet1!A2:A7,0))*(Sheet2!B\$2:B\$24))

by simple enter and it will do what you are looking for...