# Solved SUMIFS help

Discussion in 'Business Applications' started by LVE2LRN, Mar 19, 2019.

Not open for further replies.

Joined:
Mar 19, 2019
Messages:
2
I need help coming up with an excel formula
I'm not sure if I need a SUMIF, SUMIFS or some other formula.

Each patient is assigned codes (B2:E2) and each code has a value (A5:B11). I need to add up the total value for each patient.
The example below only gives a total of one code (in C2). How can I get it to total the codes in B2, C2, D2, E2 all together?

File size:
16.7 KB
Views:
3
File size:
10 KB
Views:
4
2. ### lochlomonder

Joined:
Jul 24, 2015
Messages:
2,642
Here's the formula to enter in G2:

Code:
`=SUM(VLOOKUP(B2,A6:B11,2,FALSE)+VLOOKUP(C2,A6:B11,2,FALSE)+VLOOKUP(D2,A6:B11,2,FALSE)+VLOOKUP(E2,A6:B11,2,FALSE))`
This will use individual vertical lookups on the left-most table and then sum the individual values. I did notice, however, I received an N/A error when testing this out, and the values in A7 and C2 weren't exactly the same, even though they look the same. I C&P'ed the value from the former to the latter and the code worked.

Joined:
Mar 19, 2019
Messages:
2
Wow that worked!!!!!

I never would have come up with that formula.

Thank You!

4. ### lochlomonder

Joined:
Jul 24, 2015
Messages:
2,642
You're welcome

Can you please mark this thread as Solved? That way, it may help others looking for similar solutions.

As Seen On