# Sum values by sorting text

#### sigepforrest

##### New Member
I have a spreadsheet that has data entered in by different initials (RKJ, KCJ, and so on) in column B and and a value in column E all in the same row. I am trying to find the sum of the values in column E for each initial in column B.

Any info would be much appreciated.

Forrest

### Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

#### Juan Pablo González

##### MrExcel MVP
Take a look at the SUMIF function or at Pivot Tables.

Also, if the data is sorted on column B, you could use Subtotals.

#### bhmcpfs

##### Board Regular
SUMIF or SUMPRODUCT should do the trick.

#### sigepforrest

##### New Member
I tried another SUMPRODUCT like I did for the month. Here is what I have so far but it isnt working yet: =SUMPRODUCT(((B2:B500)=RKJ),E2:E500)

Forrest

#### Juan Pablo González

##### MrExcel MVP

You can do a simple SUMIF:

=SUMIF(B2:B500,"RKJ",E2:E500)

#### Brian from Maui

##### MrExcel MVP
sigepforrest said:
I tried another SUMPRODUCT like I did for the month. Here is what I have so far but it isnt working yet: =SUMPRODUCT(((B2:B500)=RKJ),E2:E500)

Forrest

=SUMIF(B2:B500,"RKJ",E2:E500)

should suffice.

Sumproduct is used for multi-conditional counting and/or summing

see,

http://www.mrexcel.com/wwwboard/messages/8961.html

#### sigepforrest

##### New Member

Thank you Juan, that works great. Now what if I wanted to sort by date that is in column A. Here is what i am using now and it gives me sum of all values for all initials: =SUMPRODUCT(--(MONTH(A2:A500)=1),D2:D500) and i do this for every month( 1-12). Can I combine the two functions to just give me the sums of the totals in column D by a specific month and by a specific initial.

Forrest

##### MrExcel MVP
you really should investigate pivot tables.

#### sigepforrest

##### New Member
But all I am trying to do is now incorporate the SUMIF used for initials and add it into the SUMPRODUCT used for the month.

Forrest

#### Brian from Maui

##### MrExcel MVP
sigepforrest said:
But all I am trying to do is now incorporate the SUMIF used for initials and add it into the SUMPRODUCT used for the month.

Forrest

Paddy's suggestion might well worth looking into. However,

=SUMPRODUCT(--(MONTH(A2:A500)=1),--(B2:B500="RKJ"),D2:D500)

change the ranges to suit your needs.

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,168,151
Messages
5,857,671
Members
431,891
Latest member
shirazx3

### 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.

### Which adblocker are you using?

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

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