Last Row of TABLE SUM Issue after expanding range?

Utradeshow

Well-known Member
Joined
Apr 26, 2004
Messages
800
Office Version
  1. 365
Hi All,

I have a TABLE that each row has a sum in the last column. When I add rows to the table it changes my sum formula to include all rows in the table? Is there a way to only sum =SUM(W6:AI6) and have the sum remain in that specific row?
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
That seems strange, but have you tried using a fixed table reference, or using a fixed cell reference that looks like this:
Excel Formula:
=SUM($W6:$AI6)
 
Last edited:
Upvote 0
I did, I was actually off on the range. Here is the actual sheet and the result after expanding the table.

TTI Agent Rate Calculator v1.03 - TABLE TEST.xlsm
AHAIAJ
3
4
5UDF3FUEL TOTAL COST
6$0.00#VALUE!#VALUE!
7#VALUE!#VALUE!
8#VALUE!#VALUE!
9#VALUE!#VALUE!
10#VALUE!#VALUE!
11#VALUE!#VALUE!
12#VALUE!#VALUE!
13#VALUE!#VALUE!
14#VALUE!#VALUE!
15#VALUE!#VALUE!
16#VALUE!
ROLLOUT
Cell Formulas
RangeFormula
AI6:AI15AI6=VLOOKUP(I6,AGENTS!A:R,17,FALSE)
AJ6:AJ15AJ6=SUM($W6:$AI15)
AJ16AJ16=SUBTOTAL(109,[TOTAL COST])
Named Ranges
NameRefers ToCells
AGENTS!_FilterDatabase=AGENTS!$A$1:$R$165AI6:AI15
 
Upvote 0
Is this an actual Table that can use column references instead of A1 style references? It looks like it is based on the SUBTOTAL formula. What is the exact name of the first and last column that you're summing for each row?
 
Upvote 0
Is this an actual Table that can use column references instead of A1 style references? It looks like it is based on the SUBTOTAL formula. What is the exact name of the first and last column that you're summing for each row?
Here is the TABLE with the columns, I need the total after each row to be only for the specific row. I have a VBA that expands the table by the value of a cell A3 in which case may be "20" which would then add 20 rows to the table. It is at that point the SUM formula expands to the number of rows added.

TTI Agent Rate Calculator v1.03 - TABLE TEST.xlsm
WXYZAAABACADAEAFAGAHAIAJ
5Handling IN26' STRAIGHT / DRIVERDRIVER (OT)HELPERHELPER (OT)STORAGESTORAGE OVERSIZE2Handling OUTDISPOSALUDFUDF2UDF3FUEL TOTAL COST
6#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!#VALUE!$0.00$0.00$0.00#VALUE!#VALUE!
ROLLOUT
Cell Formulas
RangeFormula
W6W6=VLOOKUP(I6,AGENTS!A:G,7,FALSE)*O6
X6X6=VLOOKUP(I6,AGENTS!A:K,11,FALSE)*P6
Y6Y6=VLOOKUP(I6,AGENTS!A:L,12,FALSE)*Q6
Z6Z6=VLOOKUP(I6,AGENTS!A:M,13,FALSE)*R6*P6
AA6AA6=VLOOKUP(I6,AGENTS!A:N,14,FALSE)*S6*Q6
AB6AB6=VLOOKUP(I6,AGENTS!A:O,15,FALSE)*T6
AC6AC6=VLOOKUP(I6,AGENTS!A:P,16,FALSE)*U6
AD6AD6=VLOOKUP(I6,AGENTS!A:I,9,FALSE)*O6
AE6AE6=VLOOKUP(I6,AGENTS!A:R,18,FALSE)*V6
AI6AI6=VLOOKUP(I6,AGENTS!A:R,17,FALSE)
AJ6AJ6=SUM($W6:$AI6)
Named Ranges
NameRefers ToCells
AGENTS!_FilterDatabase=AGENTS!$A$1:$R$165AI6, W6:AE6
 
Upvote 0
Here it is with values.

TTI Agent Rate Calculator v1.03 - TABLE TEST.xlsm
WXYZAAABACADAEAFAGAHAIAJ
5Handling IN26' STRAIGHT / DRIVERDRIVER (OT)HELPERHELPER (OT)STORAGESTORAGE OVERSIZE2Handling OUTDISPOSALUDFUDF2UDF3FUEL TOTAL COST
6$15.00$420.00$0.00$0.00$0.00$0.00$0.00$15.00$0.00$0.00$0.00$0.00$75.00$525.00
ROLLOUT
Cell Formulas
RangeFormula
W6W6=VLOOKUP(I6,AGENTS!A:G,7,FALSE)*O6
X6X6=VLOOKUP(I6,AGENTS!A:K,11,FALSE)*P6
Y6Y6=VLOOKUP(I6,AGENTS!A:L,12,FALSE)*Q6
Z6Z6=VLOOKUP(I6,AGENTS!A:M,13,FALSE)*R6*P6
AA6AA6=VLOOKUP(I6,AGENTS!A:N,14,FALSE)*S6*Q6
AB6AB6=VLOOKUP(I6,AGENTS!A:O,15,FALSE)*T6
AC6AC6=VLOOKUP(I6,AGENTS!A:P,16,FALSE)*U6
AD6AD6=VLOOKUP(I6,AGENTS!A:I,9,FALSE)*O6
AE6AE6=VLOOKUP(I6,AGENTS!A:R,18,FALSE)*V6
AI6AI6=VLOOKUP(I6,AGENTS!A:R,17,FALSE)
AJ6AJ6=SUM($W6:$AI6)
Named Ranges
NameRefers ToCells
AGENTS!_FilterDatabase=AGENTS!$A$1:$R$165AI6, W6:AE6
 
Upvote 0
See if this works any better (note: the table name should fill in automatically when you hit enter, and it should fill in before [@[Handling IN]]):

Excel Formula:
=SUM([@[Handling IN]:[FUEL]])
 
Upvote 0
Solution
See if this works any better (note: the table name should fill in automatically when you hit enter, and it should fill in before [@[Handling IN]]):

Excel Formula:
=SUM([@[Handling IN]:[FUEL]])
Yes sir! Works Perfect! Thank you so much
 
Upvote 0

Forum statistics

Threads
1,221,838
Messages
6,162,286
Members
451,759
Latest member
damav78

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