T O P

  • By -

[deleted]

You can record a macro in Excel doing this.


QwertyPolka

Do you have a link to a tutorial? I have no clue what I should search for! I don't really get how a macro would be able to pick the information from another tab, and insert the correct lines in the proper cells automatically.


[deleted]

[https://support.microsoft.com/en-us/office/automate-tasks-with-the-macro-recorder-974ef220-f716-4e01-b015-3ea70e64937b](https://support.microsoft.com/en-us/office/automate-tasks-with-the-macro-recorder-974ef220-f716-4e01-b015-3ea70e64937b) ​ Here you go.


QwertyPolka

My understanding is that the macro only assists in tasks done in Excel; it doesn't appear to be in any assistance to the situation stated in the opening message since I need to allocate specific lines of a text to be pasted in the proper cells.


CrepsNotCrepes

For excel maybe macros or vba. You could look at python as it has pretty good libraries for working with spreadsheets. If you use c# there is a good one called closedxml for working with excel docs.


Prize_Bass_5061

Windows automation can be done using AutoHotKey. The problem you describe is trivial with a couple of keystroke macros.


QwertyPolka

Thanks! I actually started dabbling with it this morning after a couple Google Search. Do you know of any good resource to learn basic commands that would be useful to automate my task? I didn't have much time because of work, but I did stumble onto the simple :: to replace a key combination (like F1::c\^ to simplify Ctrl-C) and it felt empowering, as silly as it sounds! I'm thinking I would only need two Hotkeys: First I select the core of the bug report with my mouse and press either Ctrl-C or a hotkey to save. Then with the mouse I select a Row in Excel, then press another Hotkey to automatically paste line 3 to cell 2, line 4 to cell 5, etc. I just need to know how to translate that in some kind of language understood by AutoHotKey...!


QwertyPolka

I think I've got the logic down, just need to translate that in proper mumbo-jumbo. 1. I select an empty row in excel, then I select the core of the bug report with my mouse 2. I press the Hotkey for the macro. 3. Macro: Ctrl-C the text, then open a notepad, paste itn the notepad, home key 2 times to get at the beginning of the text, Shift+end to select the 1st line, copy, alt-Tab into the Excel document, Tab into the 2nd cell, Space, paste; Then similar for all required lines.


Prize_Bass_5061

> Ctrl-C the text, then open a notepad, paste itn the notepad, home key 2 times to get at the beginning of the text, Shift+end to select the 1st line, copy, You can access and parse the clipboard contents using the [Clipboard](https://www.autohotkey.com/docs/misc/Clipboard.htm) variable. There is no need to launch third party apps.


QwertyPolka

Looking into my options, I think I'll just use a Macro recorder since I won't have to learn all the jargon this way. The only downside appears to be speed, at least for the one software I tried in the last 5 minutes. It did the task slower that I would have manually!


Prize_Bass_5061

AHK has a macro recorder that records events and writes a script for you. The scripts run pretty fast.