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
ESOS10 $ 2,813 $ 5,759 $ 2,879
ESOS10 $ 10,856 $ 13,504 $ 11,961

<colgroup><col><col span="3"></colgroup><tbody>
</tbody>
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

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
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,214,642
Messages
6,120,700
Members
448,979
Latest member
DET4492

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