Sumif based on column headers

dc_951

New Member
Joined
Apr 21, 2011
Messages
6
First time post, so hello and thanks in advance.

If I have a spreadsheet with columns in A1:Z1 (say ora, tem, cha, etc.) and values listed below A2:Z9999. I have another tab that has the column headers listed in rows A1:A50 and I want to be able to have cells B1:B50 pull the sum of the column on the first tab that matches to whatever is in A1:A50.

Can I use a sumif or does it have to be sumproduct? Or would something be better?
 
I updated the row references for the index and criteria, now it works :)

But I'm still wondering why adding the wildcard fixes the issue.
 
Upvote 0

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Including the wildcards was just a test to see what would happen.

If it now returns the correct result that tells me that the cells that contain "contract" might also contain other text like unseen whitespace characters.
 
Upvote 0

Forum statistics

Threads
1,224,570
Messages
6,179,610
Members
452,931
Latest member
The Monk

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