View Single Post
  #3 (permalink)  
Old 08-28-2007, 11:11 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 551
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