+ Reply to Thread
Results 1 to 4 of 4

macro to add cell values

  1. #1
    Valued Forum Contributor
    Join Date
    11-16-2004
    Location
    Devon UK
    MS-Off Ver
    2010
    Posts
    357

    macro to add cell values

    I've been going round in circles trying to write this simple piece of code (unsuccesfully)

    I have a number of rows (say 1 to 100) and columns (say 1 to 20) with data in or possibly empty. What I want to do is add the contents of each cell in a row together (seperated with a comma) and place the result in cell 21 of each row

    Thanks in advance.

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    Try wih this code:
    Please Login or Register  to view this content.
    Regards,
    Antonio

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Tryer,

    When you say "add the cell contents separated by commas", do you mean each cell has multiple values separated by commas?

    Sincerely,
    Leith Ross

  4. #4
    Valued Forum Contributor
    Join Date
    11-16-2004
    Location
    Devon UK
    MS-Off Ver
    2010
    Posts
    357
    Thanks Antonio, That worked exactly as I wanted -- Brilliant

+ 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. macro to delete one character in a cell
    By NewsyL in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-11-2007, 03:35 PM
  2. Inserting multiple values within a single cell.
    By maacmaac in forum Excel General
    Replies: 1
    Last Post: 09-25-2007, 05:41 PM
  3. using cell content to reference a worksheet tab name in second workbook
    By Conor in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-29-2007, 09:32 AM
  4. Get macro to run on next active cell
    By walke2jd in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-09-2007, 02:00 AM
  5. Using Cell Values as Equation Variable
    By HodakMoment in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-23-2007, 02:53 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