Results 1 to 10 of 10

Adding various cells on a click??

Threaded View

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

    Re: Adding various cells on a click??

    assign this code to a button
    Public Sub sumcells()
        Dim c As Range
        Dim s
        For Each c In Selection
           If WorksheetFunction.IsNumber(c.Value) Then
             s = s + c.Value
           Else
             s = s & c.Value & " "
           End If
        Next
        Range("G3").Value = s 
        Set c = Nothing
    End Sub
    Last edited by patel45; 08-23-2012 at 02:23 PM.
    If solved remember to mark Thread as solved

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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