+ Reply to Thread
Results 1 to 6 of 6

Add contiguous cells, and put result in the top cell

  1. #1
    Registered User
    Join Date
    05-08-2014
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    9

    Add contiguous cells, and put result in the top cell

    Hi,
    I was wondering if there was a formula or VBA code to add all contiguous numbers and to post the answer to the topmost cell upto that point and delete the other cells.

    For example: The column of the left should be converted into the column on the right.

    1 3
    1
    1

    1 2
    1

    1 1

    1 1

    1 2
    1

    1 7
    1
    1
    1
    1
    1

    1 1

    1 1

    1 2
    1

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Add contiguous cells, and put result in the top cell

    Maybe:

    Please Login or Register  to view this content.
    In your sample I think 7 is wrong?

  3. #3
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Add contiguous cells, and put result in the top cell

    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  4. #4
    Registered User
    Join Date
    05-08-2014
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Add contiguous cells, and put result in the top cell

    Hey mate,
    Thanks for that but it doesn't seem to be working, I should have added an example of what I was working with, would you mind looking at the attachment? The concerned columns are R,S and U,V

    P.S Yes that should have been 6, sorry my bad.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Add contiguous cells, and put result in the top cell

    my previous code is for constants, not for formulas
    Please Login or Register  to view this content.
    Last edited by patel45; 05-13-2014 at 09:25 AM.

  6. #6
    Registered User
    Join Date
    05-08-2014
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Add contiguous cells, and put result in the top cell

    Thanks mate,
    It seems to work for R and S but not for the other two, am I doing something wrong? Do I need to select the columns in a different way?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] copy and paste from contiguous cells to non-contiguous cells using the = function
    By shameus in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-05-2013, 06:48 PM
  2. Replies: 5
    Last Post: 11-22-2013, 05:58 PM
  3. [SOLVED] How to sum non-contiguous columns applied as a formula on contiguous cells
    By figo12 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-09-2013, 01:07 PM
  4. [SOLVED] How to delete multiple contiguous (and/or) non-contiguous rows, in an excel table
    By jimmalk in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-03-2012, 05:48 AM
  5. pasting non-contiguous range of cells to new row, same cell locati
    By Not excelling at macros in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 04-04-2006, 04: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