Name
Application.ConvertFormula(Formula, FromReferenceStyle, [ToReferenceStyle], [ToAbsolute], [RelativeTo])
Synopsis
Converts cell references in a formula between the A1 and R1C1 reference styles, between relative and absolute references, or both.
Argument | Description | Settings |
---|---|---|
| The formula you want to convert. | Must be a valid formula beginning with an equals sign |
| The |
|
| The |
|
| The converted |
|
| The cell that references are relative to. Defaults to active cell. |
|
The following code converts a formula to R1C1 style relative to cell A1:
Sub TestConvertFormula( ) Dim str As String str = "=Sum(A1:A20)" Debug.Print Application.ConvertFormula(str, xlA1, xlR1C1, _ xlRelative, [a1]) End Sub
Sub test()
Dim c As Range
For Each c In Selection
c.Formula = Application.ConvertFormula(c.Formula, xlA1, , xlAbsolute)
Next
End Sub
Sub testr()
Dim c As Range
For Each c In Selection
c.Formula = Application.ConvertFormula(c.Formula, xlA1, xlA1, xlRelative)
Next
End Sub
'메모' 카테고리의 다른 글
링크시스 dir 655부터 멀티무선네트워크가능...펌 (0) | 2017.01.09 |
---|---|
pos시스템은 윈도우운영체계. usb로 프로그램설치 및 주변장치 설정가능?...펌 (0) | 2017.01.07 |
엑셀 단축키...펌 (0) | 2017.01.07 |
DID 모니터...펌 (0) | 2017.01.04 |
KT 070 VoIP 모뎀...펌 (0) | 2017.01.01 |