Jump to content
Sign in to follow this  

Compare Two Excel Cells

Recommended Posts



I am new to autoit and script writing so any help would be appreciated. (Have not programed anything in 15 years)

I have written a code that takes visual data and places it into excel, then makes the data uniform (font, color, etc..) however i am unable to take the excel data and compare it to the other data in excel while the sheet is open.

In Excel:

A1 is " Hello"

A2 is " Hello"

I am unable to get the cell A1 text into a $var1 form and the same for A2.

Once I am able to get $var1 and $var2 I am good.

now i need to compare a1 and a2 to see if they are the same while the excel sheet is open and not closed. Thanks in advance.

My system: Windows 7 Office 2007.

Edited by Etch

Share this post

Link to post
Share on other sites

#Include <Excel.au3>
$excel_object = _ExcelBookOpen("PATH")
$A1 = _ExcelReadCell($excel_object, 1,1)
$A2 = _ExcelReadCell ($excel_object,1,2)
if($A1 == $A2) Then
; They are equal

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.