+ Reply to Thread
Results 1 to 14 of 14

Sum Lastrow formula!!

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    05-09-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    259

    Re: Sum Lastrow formula!!

    Okay for some reason that doesnt do anything on mine! perhaps I'm doing something wrong, I will upload the workbook, I'm using the code below to sum columns C:J, just need to make some alterations but it seems to work for me


    Sub Sum_Last_Row()
    
    Set Lastrow = Cells(Rows.Count, "C").End(xlUp).Offset(1, 0)
     Lastrow.FormulaR1C1 = "=SUM(R2C:R[-1]C)"
    
    Set Lastrow = Cells(Rows.Count, "D").End(xlUp).Offset(1, 0)
     Lastrow.FormulaR1C1 = "=SUM(R2C:R[-1]C)"
      
    Set Lastrow = Cells(Rows.Count, "E").End(xlUp).Offset(1, 0)
     Lastrow.FormulaR1C1 = "=SUM(R2C:R[-1]C)"
     
    Set Lastrow = Cells(Rows.Count, "F").End(xlUp).Offset(1, 0)
     Lastrow.FormulaR1C1 = "=SUM(R2C:R[-1]C)"
     
    Set Lastrow = Cells(Rows.Count, "G").End(xlUp).Offset(1, 0)
     Lastrow.FormulaR1C1 = "=SUM(R2C:R[-1]C)"
     
    Set Lastrow = Cells(Rows.Count, "H").End(xlUp).Offset(1, 0)
     Lastrow.FormulaR1C1 = "=SUM(R2C:R[-1]C)"
      
    Set Lastrow = Cells(Rows.Count, "I").End(xlUp).Offset(1, 0)
      Lastrow.FormulaR1C1 = "=SUM(R2C:R[-1]C)"
      
    Set Lastrow = Cells(Rows.Count, "J").End(xlUp).Offset(1, 0)
      Lastrow.FormulaR1C1 = "=SUM(R2C:R[-1]C)"
     
     
     
     
     
     
     
     End Sub

    My one is MACRO TEST COPY
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1