Sum of Column Based on Other Column

sirsancho

New Member
Joined
Apr 9, 2019
Messages
2
Office Version
  1. 365
I have a sheet like this being used to track actors and characters lines for a record. Each line looks like so:
DraftRecord DateActorCharacterPageLine #Notes# of Lines
Pilot BLUE 05/04/23John DoeJohn Smith1123455
Pilot BLUE 05/04/23John DoeJohn Smith268103
Pilot BLUE 05/04/23John DoeJohn Smith315172
Pilot BLUE 05/04/23John DoeJohn Smith41920223
Pilot BLUE 05/04/23John DoeJohn Smith523252
Pilot BLUE 05/04/23John DoeJohn Smith845492
I have intended to have a field under each actor which totals his lines from column "# of Lines" (N), I was hoping to make it dynamic/

I would need a formula (or other solution but I am no very familar with Macros and the like) that polls column "Actor" (D) but totals (N). I tried this but no luck:

=SUMIF(D:D,D1,N:N) Where D1 is the current Role in a static sell (likely in the same row as the sum field).

Is this possible?

Thanks
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Rather than the picture, would you post using XL2BB to make it easier to copy?

Would you provide a few examples of the solution(s) you expect?
 
Upvote 0
Ensure that you have numbers in column N

T202305a.xlsm
ABCDEFGHIJKLMN
1info
2John Smith9
3
4
5Pilot BLUE 05/04/23John DoeJohn Smith315172
6Pilot BLUE 05/04/23John DoeJohn Smith41920223
7Pilot BLUE 05/04/23John DoeJohn Smith523252
8Pilot BLUE 05/04/23John DoeJohn Smith845492
9
1f
Cell Formulas
RangeFormula
N2N2=SUMIFS(N5:N1000,D5:D1000,D2)
 
Upvote 0
Thanks, that worked a treat. Could I bother you to expand on that and ask one more question? In column B there is a sum area, say in row 9, is there a way for row B to show the previous non-blank value from row D? As rows get added and removed, I would like to make the formula relatively dynamic. I had a cell polling the 8th row, but if I delete that row for any reason it breaks the calc.
 
Upvote 0
You stated "In column B there is a sum area, say in row 9, is there a way for row B to show the previous non-blank value from row D? As rows get added and removed, I would like to make the formula relatively dynamic. I had a cell polling the 8th row, but if I delete that row for any reason it breaks the calc."

You may be able to use Excel to accomplish your objective. There are many tools and functions that can help.

One possibility is to use Data Subtotals to provide the totals. You will not have to enter the formulas. Please read the help information for the feature and review
examples.

The post shows the initial view and the view with the Subtotals. N.B. The view with all entries and the view with a grand total is also available.

T202305a.xlsm
ABCDEFGH
2Heading1Heading2NameHeading4Heading5Heading6Heading7Lines
3Pilot BLUE 05/04/23John DoeJohn Smith315172
4Pilot BLUE 05/04/23John DoeJohn Smith41920223
5Pilot BLUE 05/04/23John DoeJohn Smith523252
6Pilot BLUE 05/04/23John DoeJohn Smith845492
7Pilot BLUE 05/04/23ABC22
8
9
1ff



Heading1Heading2NameHeading4Heading5Heading6Heading7Lines
John Smith Total9
ABC Total22
Grand Total31
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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