how to switch off R1C1 reference style in Excel 2007

后端 未结 2 1747
耶瑟儿~
耶瑟儿~ 2021-01-15 05:50

i\'m using excel-2007. i wanted to see smth with R1C1, then i checked the \"R1C1 Reference Style\" (office button->Excel Options->Formulas->R1C1 Reference Style)...

相关标签:
2条回答
  • 2021-01-15 06:00

    You will have to manually edit the code [scratch out]or record the macros again[/scratch out].


    EDIT:

    The Office Button>Excel Options>Formulas>R1C1 Reference Style option only applies to the reference style as it appears in a cell on a spreadsheet.

    With the R1C1 reference style off, I recorded a macro in which cell "A2" is initially selected. After the recorder starts, I enter the following forumla into "A2": =A1+12, press enter and stop the recorder. The recorded code is:

    ActiveCell.FormulaR1C1 = "=R[-1]C+12"
    Range("A3").Select
    

    With the R1C1 reference style on, the code looks exactly the same:

    ActiveCell.FormulaR1C1 = "=R[-1]C+12"
    Range("A3").Select
    

    The reason is that macro recorder always stores the formula in the FormulaR1C1 property of the ActiveCell object.

    One would have to manually edit the code like this to be in xlA1 style:

    ActiveCell.FormulaR1C1 = Range("A1").Value + 12
    
    0 讨论(0)
  • 2021-01-15 06:00

    Go in to the file menu->option->formula-> then uncheck r1c1 reference style

    0 讨论(0)
提交回复
热议问题