Sum using 2nd table as reference

gaijinko

New Member
Joined
Dec 22, 2004
Messages
18
Hello,

I cannot get my head to figure out the right formula to find a total for "Sum of Yes" in Table 1 in the example below. The sum of yes for DC (row 2) should be 4500.00 since column Bob and Column Ted for DC are yes, Florida is 5702.00, etc.

Thanks for any suggestions!


Table 1
State B C D E sum of YES
DC 4,000.00 480.00 500.00 202.00
Florida 5,000.00 1,260.00 500.00 202.00
Georgia 6,000.00 480.00 500.00 202.00
Hawaii 8,160.00 400.00 500.00 202.00
Idaho 7,000.00 660.00 500.00 202.00
Illinois 9,000.00 1,200.00 500.00 202.00
Indiana 1,000.00 480.00 500.00 202.00
Iowa 2,000.00 1,200.00 500.00 202.00

Table 2
State B C D E
DC YES NO YES NO
Florida YES NO YES YES
Georgia YES YES NO NO
Hawaii YES YES YES YES
Idaho YES NO NO NO
Illinois YES NO NO NO
Indiana YES YES NO NO
Iowa YES NO YES YES
 
Last edited:

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Thanks. I realized that the formatting of my post didn't save and I had to run to a meeting so I appreciate that you got it.

Follow up question if I can....

What if the states in the first table were random or duplicated i.e.
Indiana
Indiana
Indiana
Georgia
DC
Florida
Idaho
Florida

Is there a sort of vlookup that can be added to the sumif formula?
 
Upvote 0
You can use INDEX/MATCH within the SUMIF formula, e.g. assuming second table in J2:N10

=SUMIF(INDEX(K$2:N$10,MATCH(A2,J$2:J$10,0),0),"Yes",B2:E2)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,184
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top