# Sum of Specific Named Columns in Excel

### Question

• Hi,

i want to create aformula in excell  . i have a scenario like that i have one row in which i am giving names to columns like A,B C, etc

I want to sum those columns in which i have given the name 'A' only.

Help Required..

Regards:

Naseer

• Moved by Monday, October 25, 2010 7:54 AM (From:SQL Server Data Access)
Saturday, October 23, 2010 8:05 AM

### Answers

• It depends on what you mean by 'those columns"

Perhaps

=SUMIF(1:1,"A",2:2)

where row 1 has you column names, and row 2 has the data to sum, or

=SUMPRODUCT((1:1="A")*2:10)

where row 1 is the same, but the data to sum is in rows 2 to 10

HTH, Bernie
• Marked as answer by Monday, November 01, 2010 9:30 AM
Wednesday, October 27, 2010 10:14 PM

### All replies

• You may get better answer if you post your question in office developer forum for excel  at

http://social.msdn.microsoft.com/Forums/en/exceldev/threads

Saturday, October 23, 2010 1:26 PM
• Hello Naseer,

I am not sure if this forum is the appropriate forum for this issue. Are you looking for a method in code or UI? If you are pursuing a method in code, please see this thread: http://social.msdn.microsoft.com/forums/en-us/vsto/thread/60E22A56-9025-4AB6-AED9-513FFEBB5E20. If you have any concern on this post, just feel free to follow up. Have a nice day.

Best regards,
Bessie Zhao - MSFT

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Wednesday, October 27, 2010 8:40 AM
• It depends on what you mean by 'those columns"

Perhaps

=SUMIF(1:1,"A",2:2)

where row 1 has you column names, and row 2 has the data to sum, or

=SUMPRODUCT((1:1="A")*2:10)

where row 1 is the same, but the data to sum is in rows 2 to 10

HTH, Bernie
• Marked as answer by Monday, November 01, 2010 9:30 AM
Wednesday, October 27, 2010 10:14 PM