| T23 - Compare two columns in Excel |
| Task Description |
Automation Anywhere provides easy Excel Automation. For more information see Excel Automation Solution. This examples shows how to compare two columns in an Excel sheet.
|
| Solutions |
To see how the task runs in Automation Anywhere, download the files. T23.atmn Compare-Values.xls Note: Save the xls in C: drive, the .atmn file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks
Below are the steps that make the Task: |
 |
Open an Excel sheet
From Application Category->Excel, Select 'Open Spreadsheet' option |

Screenshot 1

Screenshot 2

Screenshot 3 |
 |
Create Variable
Click on Tools -> Variable Manager. Create variable Cell1 and Cell2 of type "value". |
 |
Insert Loop command
Insert loop command for option Times. Specify the number of rows to compare |
 |
Compare Cells
- All of the following commands need to be entered within the Loop
- Excel : Get value of Active cell and assign to variable "Cell1"
Excel : Go to one cell right of active cell
Excel : Get value of Active cell and assign to variable "Cell2"
Excel : Go to one cell right of active cell
- Compare Cell1 and Cell2 variables and based on the comparison results perform the required task.
- Go to next row in the Excel document.
|
| |
|
When you run this task, it compares two Excel columns.
|
| |
|
 |
| We started using this product to copy data from legacy system to new system. Now we use it just to do about anything automated. Countless hours saved. Thank you guys. |
- Jack Greenberg
|
| Read Customer Testimonies >> |
|