SUM with a twist

Nell1017

New Member
Joined
Aug 16, 2011
Messages
9
Hi All -

I want to be able to sum a variety of rows within my dataset. But rather than summing the entire column, I want to be able to sum based on certain criteria in another column. I have 400+ rows of data, so I would prefer not to SUM "manually" to get the dollar figures that I want.

So, I have a number of rows in my dataset with unique IDs, such as -- 1, 1.1, 1.2, 1.3, 1.5, 2, 2.1, 10, 11, 11.1, 34.3, 34.7, etc. and various dollar amounts are tied to each of these rows. I want to be able to sum all of the rows that start with 1 together - 1.1, 1.2, 1.3, 1.5. All of the ones that start with 2 together and so on.

Is there any way to automatically group them together and make this happen? I am at a loss :eeek:, any help would be appreciated!
 
Better options, Nell1017:

njimack:

=IF(A2=INT(A2),SUM(IF(INT($A$2:$A$12)=A2,$B$2:$B$12)),"")
HOTPEPPER:

=IF(A2=INT(A2),SUMPRODUCT(--(INT($A$2:$A$12)=A2),$B$2:$B$12),"")
Less function calls than what I suggested (I don't know why I didn't think of this approach :oops:).

Matty :)
 
Upvote 0

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Thanks so much everyone!

Looks like I am just not good at following directions. I was hitting Control+Alt+Enter, and it took me a few times to realize what I was doing wrong.

Thanks again for all your help!:biggrin::biggrin:
 
Upvote 0

Forum statistics

Threads
1,224,620
Messages
6,179,928
Members
452,949
Latest member
beartooth91

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