+ Reply to Thread
Results 1 to 3 of 3

RC vs. cells

  1. #1
    Registered User
    Join Date
    01-18-2012
    Location
    Constanta, Romania
    MS-Off Ver
    Excel 2007
    Posts
    2

    RC vs. cells

    I just have a question. Can I change in formula from below

    ActiveCell.FormulaR1C1 = "=R[-1]C[-1]+RC[-1]+RC[-2]+RC[-3]"

    into something like:

    For i = 1 to n
    "make summ from" cells(1,i)

    Actually i would like to change the RC format in something where i can control a row or a column, no matter what formula i use

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: RC vs. cells

    You can assign the row & column references to variables and then use it in the RC formula.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: RC vs. cells

    Hi IstrateCr,

    You can also use built-in function of Excel - those builded functions should always work faster then self written
    Please Login or Register  to view this content.
    or even write your own function and then call it in any call of your workbook ["=countIT(A1:A3)"]
    Please Login or Register  to view this content.
    Last edited by MaczaQ; 02-02-2012 at 02:24 PM. Reason: code clean up
    Best Regards
    MaczaQ
    ---------------------------------------------------------------------------------------------------------------------------
    If you are satisfied with the solution(s) provided, please mark your thread as Solved
    If you are pleased with my answer consider to rate it. To thank someone who has helped you, click on the star icon below their name.
    - This way you will add him some reputation points ... thanks in advance.

+ 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