+ Reply to Thread
Results 1 to 3 of 3

Adding Formula

  1. #1
    Registered User
    Join Date
    04-11-2013
    Location
    Newcastle, England
    MS-Off Ver
    365
    Posts
    6

    Adding Formula

    Good Morning. I have a user form, opened from Sheet1, to add data to sheet2 , which works fine. However I would like to sum the cells B:L in column M.
    I have the following code but where do I add the reference to sheet2 as the formula is being placed in sheet1. I I just don't seem to be able to get it right.. any help would be appreciated

    Lastrow = Range("A65536").End(xlUp).Offset(1, 0).Row
    Range("M" & Lastrow) = "=Sum(B1:L" & Lastrow - 1 & ")"

    Thank you

    Marc

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Adding Formula

    Marc,
    Please use code tags with your code.
    The code does not have a sheet reference, so it could work in any sheet, just put the cursor in sheet2 and run it, or

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-11-2013
    Location
    Newcastle, England
    MS-Off Ver
    365
    Posts
    6

    Re: Adding Formula

    Sorted it, Thanks for the help

+ 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] Formula for adding a percentage from one cell and adding the total of 2 others
    By Kandra in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-04-2013, 06:48 AM
  2. adding Indirect formula to my current sum if array formula
    By Eastbay2 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 05-13-2013, 09:41 AM
  3. Replies: 1
    Last Post: 02-24-2013, 06:27 PM
  4. [SOLVED] Adding a match formula to an existing formula
    By pauldaddyadams in forum Excel General
    Replies: 8
    Last Post: 08-16-2012, 05:14 PM
  5. Replies: 8
    Last Post: 03-21-2012, 12:04 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