Results 1 to 5 of 5

Sum two rows in a range

Threaded View

GIS2013 Sum two rows in a range 07-05-2014, 08:19 AM
HaHoBe Re: Sum two rows in a range 07-05-2014, 09:44 AM
GIS2013 Re: Sum two rows in a range 07-05-2014, 10:04 AM
HaHoBe Re: Sum two rows in a range 07-05-2014, 10:18 AM
GIS2013 Re: Sum three rows in a range... 07-05-2014, 10:27 AM
  1. #1
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    Sum two rows in a range

    Hi. I have a "big" range and a smaller one in which each cell is the sum of two cells in the big range. It's more simple in the file attached. I was thinking about something like this, any modification/other suggestion?

    Private Sub test()
    Dim a As Range, b As Range, c As Byte
        With Worksheets("s")
        Set a = .Range("a2:e6")
            For Each b In a
            b.Value = Application.WorksheetFunction.Sum(.Cells(b.Offset(9), b.Offset(11)))
            Next b
        End With
    End Sub
    Attached Files Attached Files
    Last edited by GIS2013; 07-05-2014 at 08:23 AM. Reason: Now with the right sample file
    Please * if you like the answer

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] First unhide all rows - then hide rows based on specific cell value for a range of cells
    By robbiekh in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-22-2013, 05:46 PM
  2. Replies: 4
    Last Post: 09-24-2013, 05:44 AM
  3. excel 2007 macro need to have variable range of rows rather than fixed range
    By JW1028 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-20-2013, 02:45 PM
  4. Hide rows in range 2 based on filter selection in range 1
    By gtol in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-28-2012, 02:09 PM
  5. Replies: 1
    Last Post: 06-17-2006, 09:10 PM

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