sum two cellls in different rows/deleting second row-loss of data

jlr123

New Member
Joined
Mar 6, 2014
Messages
44
I have many rows in spreadsheets that I need to first add value in c1 to d1 and then delete d1 as an example
[TABLE="width: 677"]
<colgroup><col><col span="3"></colgroup><tbody>[TR]
[TD]ESOS10[/TD]
[TD] $ 2,813[/TD]
[TD] $ 5,759[/TD]
[TD] $ 2,879[/TD]
[/TR]
[TR]
[TD]ESOS10[/TD]
[TD] $ 10,856[/TD]
[TD] $ 13,504[/TD]
[TD] $ 11,961[/TD]
[/TR]
</tbody>[/TABLE]
Add 2813 +10856 delete 10856 - add 5759+13504 delete 13504 etc

Is there any quick way to add each and delete the second row without losing the summed values?
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Use the following codes to to sum successive rows of col C and delete the latter.
Sub ggg()
Dim a As Integer, x As Integer
x = Sheets("sheet1").Cells(Rows.Count, 3).End(xlUp).Row
For a = x To 1 Step -2
Cells(a - 1, 3) = Cells(a, 3) + Cells(a - 1, 3)
Rows(x).Delete
Next a
MsgBox "complete"
End Sub
Ravi shankar
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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