Jun 23 2021 08:14 AM
Hi all,
I have a workbook with 2 worksheets, Sheet1 and Sheet2.
I need to lookup values in Sheet1, Col E (Employee-E) and Col H (Ded-Code-E) and find matches in Sheet2, Col C (EdmEmployee) and Col D (EdmDedCode). If I find a match, I want to copy the entire row over to new Sheet3.
I've uploaded test spreadsheet with a few rows for reference.
I have a VB macro in there, but don't know how to edit it to do what I want. Pretty new to Excel and macros, so I'm a bit over my head here!
Thanks in advance!!
Have a great day:)
Rufus
Jun 23 2021 08:30 AM
From which sheet do you want to copy a row to Sheet3? From Sheet1 or from Sheet2?
Jun 23 2021 08:33 AM
Jun 23 2021 08:58 AM
I;ll look at it later if nobody else does.
Jun 23 2021 09:11 AM
Jun 23 2021 01:05 PM
See the attached version.
Jun 23 2021 02:21 PM
Jun 23 2021 02:25 PM
Go ahead!
Jun 23 2021 02:30 PM
Jun 23 2021 02:36 PM
For the Dictionary object, see:
Excel VBA Dictionary – A Complete Guide
The line
dct(lookupSheet1.Range("L" & curRowLookup1).Value) = 1
does one of two things:
Jun 23 2021 02:51 PM
Jun 23 2021 02:56 PM
Yes.
Jun 23 2021 02:58 PM
SolutionJun 23 2021 02:58 PM
Solution