+ Reply to Thread
Results 1 to 4 of 4

Writing a sub using R1C1 formatting for a sum

  1. #1
    Registered User
    Join Date
    02-15-2013
    Location
    Evansville, Indiand
    MS-Off Ver
    Excel 2010
    Posts
    2

    Writing a sub using R1C1 formatting for a sum

    Hello, I am fairly new to writing code in VBA and my current assignment is to use the R1C1 formatting to sum up data from a years worth of sales. I know that i need to write it to insert in Cell N4, and I know that i need to use "=SUM(RC[-12]:RC[-1])" to sum that row up, but I am having trouble getting the correct code in order. If someone could point out the right order of it, I can fill in the correct information. Thank you very much

  2. #2
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: Writing a sub using R1C1 formatting for a sum

    Hi and welcome.

    Do you mean something like
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-15-2013
    Location
    Evansville, Indiand
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Writing a sub using R1C1 formatting for a sum

    Yes that is exactly what i meant! Thank you. I think this next part is easy, but to copy it down would it just be something like Cell("N4").Copy Destination=Range("N5:N14") ? And also, since I want to copy the formula down, would I need to make the values for the formula absolute?

  4. #4
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: Writing a sub using R1C1 formatting for a sum

    I don't think you need to make the values absolute, since you always want to sum the values in the current row (I guess). Also, copying the formula is not necessary, just use something like
    Please Login or Register  to view this content.
    Happy monday!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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