Identify the end of row and SUM total

Hiten_pan

New Member
Joined
Mar 13, 2018
Messages
24
Hi all,
I have a set of data in column D which is formulated which pulls the value from different tab with Vlookup function. I need a nested formulae where it can sum up the value automatically at the end of the row as shown in red color.
please note the line items are not fixed so, formulae is dragged after we get sum total. the rows below the sum total should remain blank.


[TABLE="width: 876"]
<tbody>[TR]
[TD]1-SWU00MIE0
[/TD]
[TD]SWU00MIE0
[/TD]
[TD]IRS GBP 1.50000 03/21/18-10Y LCH
[/TD]
[TD] (5,900,000)
[/TD]
[/TR]
[TR]
[TD]1-SWU00JR72
[/TD]
[TD]SWU00JR72
[/TD]
[TD]IRS USD 1.25000 06/21/17-2Y CME
[/TD]
[TD] (6,300,000)
[/TD]
[/TR]
[TR]
[TD]1-SWU00M4A3
[/TD]
[TD]SWU00M4A3
[/TD]
[TD]IRS USD 2.00000 12/20/17-2Y LCH
[/TD]
[TD] (21,400,000)
[/TD]
[/TR]
[TR]
[TD]1-SWU00LBN9
[/TD]
[TD]SWU00LBN9
[/TD]
[TD]IRS JPY 0.41500 03/25/19-10Y LCH
[/TD]
[TD] (60,000,000)
[/TD]
[/TR]
[TR]
[TD]1-SWU00KXL1
[/TD]
[TD]SWU00KXL1
[/TD]
[TD]IRS JPY 0.45000 03/20/19-10Y LCH
[/TD]
[TD] (1,030,000,000)
[/TD]
[/TR]
[TR]
[TD]1-SWU00MO45
[/TD]
[TD]SWU00MO45
[/TD]
[TD]IRS JPY 0.30000 03/20/18-10Y LCH
[/TD]
[TD] (1,033,100,000)
[/TD]
[/TR]
[TR]
[TD]1-US67576GAB32
[/TD]
[TD]US67576GAB32
[/TD]
[TD]ODBRCHT OFFSHRE DRLL FIN
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]1-981CAEII8
[/TD]
[TD]981CAEII8
[/TD]
[TD]CREDIT SUISSE FOB
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]1-22899W925
[/TD]
[TD]22899W925
[/TD]
[TD]CREDIT SUISSE SEC LLC COC
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD]1-PRCOFFSET
[/TD]
[TD]PRCOFFSET
[/TD]
[TD]DIFFERENCE BETWEEN WTB & HOLDINGS
[/TD]
[TD] -
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] (662,679,114)
[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Do you mean that the number of rows can change? Also what is the formula for the negative value in red, if I add up the values above it I would get a different result.
 
Upvote 0
Do you mean that the number of rows can change? Also what is the formula for the negative value in red, if I add up the values above it I would get a different result.

I have only given you last few rows only because data is huge in numbers and 662k is the result of total sum of the above rows.
 
Upvote 0
Still not clear on the workflow, are you saying as part of the vlookup you wanted to sum up at the end, are you copying formulas to the right, etc? Can you try to explain your issue a bit clearer?
 
Upvote 0
Column A is unique value which is used to pull the data for column b c d using vlookup function. At the end of the row in column D it should sum up.
 
Upvote 0
There is no generic formula that will work if your table size is changing but here are a couple approaches I can think of.
1. Put the sum formula in a different column or summary area. =SUM(D:D) will work even if you have table names and will capture all entries even if you add or delete rows.
2. Resolve it in VBA by finding the last entry and adding all of the cells above it.
3. If the data is consecutive you're only 1 click away from the sum.. "Alt" + "="

Hope that helps
 
Upvote 0
To add to the above, if possible, just put the data in an Excel Table and add a Total Row
 
Upvote 0

Forum statistics

Threads
1,223,632
Messages
6,173,472
Members
452,516
Latest member
archcalx

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