Excel macro: the same possible with AHK?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Savignac13
Posts: 1
Joined: 23 May 2022, 12:06

Excel macro: the same possible with AHK?

Post by Savignac13 » 23 May 2022, 12:33

Hi,
I am currently using a macro on Excel and I would like to know if In can do it with autohotkey ?

I have a excel summary file called "Summary" which contains 18 tabs (which correspond to 18 areas).

Each area is classified in a "areas" directory:
area 1: subdirectory that contains a "Clients" file on which a data refresh macro is run
area 2: subdirectory that contains a "Clients" file on which a data refresh macro is run
area 3: Clients file....etc

The client file and the macro are identical regardless of the directory. What changes are the data that will have been entered upstream.

I would like to be able to have a macro that executes a routine that is:
- open a directory,
- run the macro,
- copy the result into the "Summary" file
- then close the file and then go to the next one until the 18th file.

At the end of the macro, the "Synthesis" file will be filled with the results of the 18 regions without having to open each of the files individually.

Could someone help me about this telling me if it's possible to do it with autohotkey ?

My english is not good, I am french :)

Sarah

User avatar
flyingDman
Posts: 2791
Joined: 29 Sep 2013, 19:01

Re: Excel macro: the same possible with AHK?

Post by flyingDman » 23 May 2022, 16:28

You need to tell us a bit more.
AHK can do 99.9% of what VBA macros can do, so it is likely that you can have AHK handle your project.
Correct me if I misunderstand : you have a folder that has 18 sub-folders, one for each area. Each of these sub-folders contains one Excel file, a "clients" file. You want a script to copy a range in each of these clients files and paste it in a sheet of a "Summary" file, one sheet for each area.
If this is correct, are you copying the same range (say "A3:K24") for each of these 18 files or does the macro summarize the data using a pivot table or something like that? Does the macro create each sheet in the Summary file. if not, how does it know where to paste data. If yes, what should the sheets be named?
14.3 & 1.3.7

Post Reply

Return to “Ask for Help (v1)”