+ Reply to Thread
Results 1 to 14 of 14

Convert R1C1 Style to A1 style

  1. #1
    Registered User
    Join Date
    03-21-2011
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2007
    Posts
    6

    Convert R1C1 Style to A1 style

    I have a workbook that is being used enterprise-wise. The version hosted on the SharePoint site is in the desired "A1" formula style. This formula style is necessary for the conditional formatting in the cells to function properly. However, some user or users somewhere must have their personal.xls set to R1C1, because I am getting error reports the workbook is not functioning correctly and they are sending me back either
    a) Files in R1C1 format
    b) Files in which single quotes have been added around cell references. This is something excel does when an R1C1 workbook is opened as A1 format.

    Either option makes the conditional formatting function incorrectly.

    What I would like to do is insert VBA code which converts any file stored in R1C1 format to A1 format, and then replace the single quote cell references with correct references.

    What I have done:
    Placed the following code in a Workbook_Open macro in "This Workbook"
    Application.ReferenceStyle = xlA1

    However, this prompts with "Name cannot resemble a reference" and asks for an input for every conditional format cell reference (there are many).

    What I was thinking is I send it some "dummy" cell reference, for instance it is asking for "Old Name: A16, New Name: " And I could enter _A16, and so on for "Old Name: B16, New Name: " _B16, etc. Then, in the workbook_open macro, I would delete all existing conditional formatting and replace with desired formatting.

    A) Does this make sense and is there an easier way to do this? And
    B) If so, does anyone know how to enter "_A16", etc. using code into the message prompt.

    Sorry for the long post. I don't know if anyone can help with this. Ideally, this should be transparent to users, who possess varying levels of technical aptitude.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Convert R1C1 Style to A1 style

    I just entered

    Please Login or Register  to view this content.
    I hovered over the = and excel gave me two options one of which was xlA1

    Which VBA accepted as

    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

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

    Re: Convert R1C1 Style to A1 style

    I would suggest that you upload a small sample workbook that we can tinker with. As one who routinely uses R1C1 notation, I don't usually have trouble converting back and forth between A1 and R1C1 notation.

    As a bare bones sample, I have created a simple spreadsheet that computes a bunch of random numbers and highlights all those that are greater than 0.75. I created it in R1C1 notation and it worked just fine for me. Can you open it in A1 notation and have it still work? What is similar and what is different between my simple sheet and yours?
    Attached Files Attached Files
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Registered User
    Join Date
    03-21-2011
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Convert R1C1 Style to A1 style

    Thanks mehmetcik. The problem I am having with this approach is that if I perform the code you provided, it throws an error "Name cannot resemble a reference" and asks for an input for every conditional format cell reference. Does that make sense?

  5. #5
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Convert R1C1 Style to A1 style

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

  6. #6
    Registered User
    Join Date
    03-21-2011
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Convert R1C1 Style to A1 style

    I understand StephenR. I have deleted the cross posting. My apologies.

  7. #7
    Registered User
    Join Date
    03-21-2011
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Convert R1C1 Style to A1 style

    Okay, I have attached the file. When I either select File>Options>Formulas and unselect "R1C1 Reference Style" OR use VBA code, I get the same name reference error. "Name cannot resemble a reference."
    Attached Files Attached Files

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Convert R1C1 Style to A1 style

    The project is password-protected. That's not much help.
    Entia non sunt multiplicanda sine necessitate

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Convert R1C1 Style to A1 style

    Also, the workbook you posted opens in A1 format.

  10. #10
    Registered User
    Join Date
    03-21-2011
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Convert R1C1 Style to A1 style

    Apologies, password is GileadUS. As far as opening in A1, it seems to open in whatever format is currently open, or is your default. So, if there is an excel worksheet opened in R1C1, it will open in R1C1, if one in A1, or your personal default is A1, it seems to open in A1.

  11. #11
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: Convert R1C1 Style to A1 style

    Hi m1ngle
    In my XL 2007 or 2010 it either crashes on trying to open or takes for ever to do anything.
    It is pretty massive as well, - we prefer a sample of data reduced in size.
    I cannot find any formulas at first glance. ( Not sure if that is relevant to the request )
    As shg says, you cannot get to work on any ,macros in it


    It is well worth it in the long run to take some time to read up on posting techniques, see here for example
    http://www.excelforum.com/showthread...09#post4519006
    You can get some awesome help if you can master posting correctly
    Alan
    Last edited by Doc.AElstein; 11-18-2016 at 04:29 AM.
    '_- Google first, like this _ site:ExcelForum.com Gamut
    Use Code Tags: Highlight code; click on the # icon above,
    Post screenshots COPYABLE to a Spredsheet; NOT IMAGES PLEASE
    http://www.excelforum.com/the-water-...ml#post4109080
    https://app.box.com/s/gjpa8mk8ko4vkwcke3ig2w8z2wkfvrtv
    http://excelmatters.com/excel-forums/ ( Scrolll down to bottom )

  12. #12
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: Convert R1C1 Style to A1 style

    Duplicate post

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

    Re: Convert R1C1 Style to A1 style

    My experience was similar to Doc.AElstein's -- it is so big that it bogged my machine down and I couldn't really do anything with it.

  14. #14
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Convert R1C1 Style to A1 style

    When I switch to A1 references, I get a name conflict with A16, but I don't see that name defined.

+ 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] Using variable in R1C1 style
    By realdemigod in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-10-2016, 11:29 AM
  2. [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
  3. Stuck in R1C1 reference style
    By 2504 in forum Excel General
    Replies: 9
    Last Post: 12-30-2006, 09:05 PM
  4. R1C1 style reference as Condition
    By aca in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-07-2006, 08:40 AM
  5. How to code with the R1C1 Style of Reference?
    By plh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-22-2006, 02:35 PM
  6. R1C1 Reference Style won't STAY gone?
    By khrystle in forum Excel General
    Replies: 5
    Last Post: 03-01-2006, 06:40 PM
  7. [SOLVED] R1C1 reference style
    By Peg P in forum Excel General
    Replies: 2
    Last Post: 11-15-2005, 02:50 PM

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