Results 1 to 2 of 2

Thread: sum two cellls in different rows/deleting second row-loss of data
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Mar 2014
    Posts
    25
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

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

    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
    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?

  2. #2
    Board Regular
    Join Date
    Feb 2006
    Posts
    3,566
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

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

    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

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •