# need help with doing sums

#### J4L

##### New Member
Hi All,

I hope someone will be able to assist me in the below example sheet:

Excel 2007
ABCDEFGHIJ
1MonthNameTypeTotalDaycaseOrdinary
2Jan-12name1daycase11Name111
11
3Feb-12name1
ordinary4
Name2
4Mar-12name3daycase6Name3
5Feb-12name4
daycase9Name4
6Feb-12name2ordinary13
7Jan-12name2ordinary2
8Jan-12name3ordinary4
9Jan-12name4daycase6
10Mar-12name4daycase5
11Mar-12name1ordinary7
12

</tbody>
DATA

From Column A11:D11 is my data - a little further on the right will be a summary of the data. What i want is a formula in I2 & J2 that will sum up Name1 with the total of daycase and ordinary, e.g. we have three names of name1, of which one has a daycase of 11 and the other two are ordinary of the totals 7 & 4... so in J2 the formula will return 11....

Perhaps a sumif statement? Any suggestions?

Thanks

### Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
I2 formula (Note the placement of the \$ signs!)
=SUMIFS(\$D:\$D,\$B:\$B,\$H2,\$C:\$C,I\$1)
Copy formula to J2 and copy both I2 & J2 down to other rows in those columns

This looks like a simple pivot table. Name in the rows and type in the columns and total in the value.

In I2 and copied down try: =SUMPRODUCT(--(\$B\$2:\$B\$11=H2),--(\$C\$2:\$C\$11="daycase"),(\$D\$2:\$D\$11))

For J2 just change the literal daycase to ordinary

In I2 and copied down try: =SUMPRODUCT(--(\$B\$2:\$B\$11=H2),--(\$C\$2:\$C\$11="daycase"),(\$D\$2:\$D\$11))

For J2 just change the literal daycase to ordinary

West,
why type in the literals? Why not use (\$C\$2:\$C\$11=I\$1) Also, don't you need a \$ on H2 so it is \$H2?

West,
why type in the literals? Why not use (\$C\$2:\$C\$11=I\$1) Also, don't you need a \$ on H2 so it is \$H2?

Thanks to everyone, all the examples given worked by a little tweaking around

Replies
5
Views
184
Replies
8
Views
260
Replies
5
Views
196
Replies
1
Views
222
Replies
2
Views
187

1,202,987
Messages
6,052,938
Members
444,616
Latest member
novit19089

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