# SolvedSUMIFS help

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

#### LVE2LRN

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?

#### Attachments

• 16.7 KB Views: 3
• 10 KB Views: 4

#### lochlomonder

Colin
Spam Fighter
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.

#### LVE2LRN

Wow that worked!!!!!

I never would have come up with that formula.

Thank You!

#### lochlomonder

Colin
Spam Fighter
You're welcome

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

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

As Seen On