+ Reply to Thread
Results 1 to 8 of 8

R1C1 Formula Issues

  1. #1
    Forum Contributor
    Join Date
    10-16-2010
    Location
    Memphis, TN
    MS-Off Ver
    Excel 2003, 2010
    Posts
    151

    R1C1 Formula Issues

    Greetings All!

    I have a workbook that has been working for a few years now with minor modifications. The boss has just asked for some additional information and I am hitting a brick wall in trying to modify an R1C1 formula that has been working fine.

    Please Login or Register  to view this content.
    Instead of RC[-1] I need it to be "LEFT(RC[-1],2)". Is this possible or do I need to re-write it as an a1 style formula?

    Thanks
    Last edited by jacob@thepenpoint; 06-03-2015 at 06:17 PM.
    Jacob Albers
    Excel 2003 & 2010

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: R1C1 Formula Issues

    Instead of RC[-1] I need it to be "LEFT(RC[-1],2)"
    Hum ...curious no.
    RC[-1] is a cell
    LEFT(RC[-1],2) is a part of the cell's value
    - Battle without fear gives no glory - Just try

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: R1C1 Formula Issues

    Have you tried simply substituting "left(rc[-1],2)" in place of the "rc[-1]" portion of the formula string? I don't use the sumif function a lot, but it seems like it should be that simple.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Forum Contributor
    Join Date
    10-16-2010
    Location
    Memphis, TN
    MS-Off Ver
    Excel 2003, 2010
    Posts
    151

    Re: R1C1 Formula Issues

    Exactly, I had to add some information to the cell (which is a label) but the sumif criteria is looking at the entire contents of the cell instead of just the two leftmost characters in the cell. Doing it with an a1 stryle it would be left(a1,2) to return the left 2 characters in cell a1.

    Jake

  5. #5
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: R1C1 Formula Issues

    I think you should be fine, if you are looking for help with building the string, I came up with this and tested it. Seems to work fine.

    Please Login or Register  to view this content.
    Just a note about R1C1. Using R1C1 in VBA is great for loops, but it doesn't mean your sheets have to be in R1C1 format. If your sheet is A1 format your formula will just show up as A1 when the VBA is run.
    Last edited by skywriter; 06-03-2015 at 06:13 PM.
    Click the * Add Reputation button in the lower left hand corner of this post to say thanks.

    Don't forget to mark this thread SOLVED by going to the "Thread Tools" drop down list above your first post and choosing solved.

  6. #6
    Forum Contributor
    Join Date
    10-16-2010
    Location
    Memphis, TN
    MS-Off Ver
    Excel 2003, 2010
    Posts
    151

    Re: R1C1 Formula Issues

    Thanks! I had a stray quotation mark causing me fits.

    Jake

  7. #7
    Forum Expert skywriter's Avatar
    Join Date
    06-09-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    2,760

    Re: R1C1 Formula Issues

    Quote Originally Posted by jacob@thepenpoint View Post
    Thanks! I had a stray quotation mark causing me fits.

    Jake
    Thanks for the rep. points. Something I do because I don't use R1C1 enough to be good at it. I write a formula in A1 in a cell and then I go to File(Excel 2010), Options, Formulas and then I check the box that has R1C1 reference style and then okay. When I go back to the sheet the formula in the cell is R1C1, I copy it, paste it into VBA and manipulate it from there.

  8. #8
    Forum Contributor
    Join Date
    10-16-2010
    Location
    Memphis, TN
    MS-Off Ver
    Excel 2003, 2010
    Posts
    151

    Re: R1C1 Formula Issues

    I think I'll try that, I don't use r1c1 much either, and don't work a lot in VBA so everything tends to go stale on me. Thanks again.

+ 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. Using R1C1 formula in VBA changes all references from CELL("address") function to R1C1?
    By dmasters4919 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-20-2014, 04:17 PM
  2. r1c1 formula
    By mma3824 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-01-2012, 03:48 PM
  3. [SOLVED] Need to Convert Formula R1C1 into A1-style but the Formula String exceeds 255 characters
    By VBA_Gary in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-04-2012, 12:09 PM
  4. [SOLVED] R1C1 Formula help
    By aad401 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-25-2012, 08:45 PM
  5. Formula R1C1
    By SMILE in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-26-2010, 10:20 AM

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