Intelligent Automation & Macro Software  

Go Back   Tethys Solutions Forums > Products Zone > Automation Anywhere
Register FAQ Search Today's Posts Mark Forums Read

Automation Anywhere Post messages and questions related to Automation Software here.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-27-2007, 04:57 AM
sesachacha sesachacha is offline
Junior Member
 
Join Date: Aug 2007
Posts: 1
Default Automate identifying a variable and acting on it in excel

I receive a new excel spreadsheet on a daily basis which has one of 20 possible headings in cell A2. One of the tasks that I need to do is run one of 20 macros that are stored within excel by typing a hotkey. The macro that I run is determined by the name of the heading in cell A2.

Using AA, I am attempting to automate the following tasks:

1) Identify the heading name in cell A2 for each spreadsheet.
2) run the corresponding macro using the proper hotkey.
3) should the heading not match any of the 20 headings (for example it was misspelled) then pause the task and prompt me to press the hotkey.
4) once the hotkey is pressed, the task resumes.

Any help in accomplishing this is greatly appreciated.
Reply With Quote
  #2 (permalink)  
Old 08-28-2007, 09:18 AM
marcgallant marcgallant is offline
Member
 
Join Date: Jul 2007
Location: Dieppe, New Brunswick Canada
Posts: 46
Default Using CTRL+C

Hi,
Is this an actual heading in excel, or a cell value that you can copy. If you can copy it, you could use AA to click on the cell you need, type a keystroke in your script to copy the value to memory (CTRL+C), and then in your script have IF statements "IF $clipboard$ = x" run macro x, etc.
Reply With Quote
  #3 (permalink)  
Old 08-28-2007, 10:11 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 465
Default

Hello,

What we understand you have an excel workbook with 20 different sheets and excel macro. You want to run the excel macro according to the heading in cell A2 of active sheet. Right?

To run the excel macro according to the heading in cell A2, what you can do is go to Tools-> Task Editor to create a new task. In editor create a task as follows:

1)Using ‘Insert Keystroke’ command apply CTRL+g to go to cell A@
2)Copy the cell by applying F2, Shift+Home, then CTRL+c
3)Use ‘If-Variable’ command to check ‘If $Clipboard’ equals to “some text” then apply hotkey accordingly. The task would look something like as follows:

Keystrokes: [CTRL DOWN]g[CTRL UP] in "Microsoft Excel - wksplog"
Keystrokes: A2[ENTER] in "Go To"
Keystrokes: [F2][SHIFT DOWN][HOME][SHIFT UP] in "Microsoft Excel - wksplog"
Delay: (200 ms)
Keystrokes: [CTRL DOWN]c[CTRL UP] in "Microsoft Excel - wksplog"
Delay: (100 ms)
If $Clipboard$ Equal To "abc" Then //If Cell A = “abc”
Message Box: "Macro 1" //Run Macro 1
End If
If $Clipboard$ Equal To "def" Then
Message Box: "Macro 2"
End If

Hope that helps.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 05:30 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc.
Copyright © 2003-2008 Tethys Solutions, LLC. All rights reserved