Excel copy paste and compare strings

Get help with using AutoHotkey and its commands and hotkeys
Posts: 1
Joined: 18 Sep 2020, 09:01

Excel copy paste and compare strings

18 Sep 2020, 09:30

Hey guys,

I'm very new to AHK and I watched a good amount of tutorials from Joe Glines (I installed the Lib he uses) and read a lot about the different features AHK has in the doc as well as crawled the forums for a good few days.

Currently, I'm trying to work out some copy/pasting and string comparison in Excel, which is probably basic as can be..
Because I can't write a script in AHK for the life of me for now, I'm trying to use Pulover's Macro Creator which was suggested in the doc, somewhere.
But I'd much rather achieve my goal with AHK which would allow for a much wider range of uses when I can manage to understand well what I need to write and where.

Enough rambling ;)

Attached is a picture Sheet 1 (top) and Sheet 2 (bottom).
Sheet 1 has data that needs to be moved to Sheet 2 according to the dot colors.
Note : DOC# is known in both sheets which is currently my reference.
Note 2 : no header available in Sheet 1.

If picture wasn't clear here's an explanation of the relations between the worksheets :
SOMENUMBER is associated with a REF.DATE.
Each SOMENUMBER has 1 or more DOC#.
Each DOC# has 1 ASSOCIATED.DATE, an AMNT and a LETTER.SOME.REF.13.CHAR.LONG cell, from which I need the 13 first chars only.

What I'm doing at the moment and want to improve on :

I'm currently using the macro recorder to do it line by line, using ctrl + F on the DOC# from Sheet 1 on Sheet 2, to have it work the line it should go to and moving from there with the direction keys.
It works OK.

What I'm struggling with is conditions :
- A few SOMENUMBERS in Column A are associated with more than 1 DOC# in Column B, which is problematic because the spacing changes (jumps a line) and the REF.DATE in Column F doesn't repeat.
- I can't work out how to compare AMNT for each line of DOC# (Column M) between the 2 worksheets and highlight in Sheet 2 if it's different from Sheet 1.

What I'm looking for here is pointers!
As to what I should read and learn to achieve my goal --> Dropping links is fine, more is welcome of course too.

Thanks a lot for any help you can provide me with :thumbup:
Feel free to ask questions I'll try my best to help you help me!

cc3.png (405.2 KiB) Viewed 38 times

Return to “Ask For Help”

Who is online

Users browsing this forum: Jianwei, Lem2001 and 40 guests