Jump to content
Sign in to follow this  
John117

More Excel stuff. How to get . . . in r1c1 format

Recommended Posts

John117

#Include <Excel.au3>
$oExcel = _ExcelBookNew(1)
_ExcelSheetAddNew($oExcel, "Temp")
_ExcelSheetActivate($oExcel, "Temp")
_ExcelWriteCell($oExcel, 1, 1, 1)
_ExcelWriteCell($oExcel, 2, 1, 2)
_ExcelWriteCell($oExcel, "=RC[-2]+RC[-1]", 1, 3)
$oExcel.ActiveSheet.Range("C1" ).Activate
$Row = $oExcel.ActiveCell.Row
$Column = $oExcel.ActiveCell.Column
$Formula = $oExcel.ActiveCell.Formula
$FormulaR1C1 = $oExcel.ActiveCell.FormulaR1C1
$Value = $oExcel.ActiveCell.Value
Msgbox(0,"R1C1", $Row & ", " & $Column & ", " & $Formula & ", " & $FormulaR1C1 & ", " & $Value)

Enjoy. -should work for all versions . . .

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.