In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Find string between two different files-help with macro

svancha
5 - Atom

Hello Alteryx Community,

 

I am very new to alteryx and I need your help.

 

I have two large files that I need to work on, so please guide me if a macro works better. I have attached two sets of sample data (Sheet1 and Sheet2) for convenience. The column "B" (String) in Sheet 1 has to be present in Sheet 2. And if column "C" combinations in Sheet 1 is found in Sheet 2 then it's "In" else "Out". I want my final output as Column "D" in Sheet 1 (In/Out). The 1st two or three values (DR....,AAA....) of column "B" in Sheet 1 could either be the column headers of Sheet 2 or the value under those headers. 

 

Sheet1: 

svancha_3-1629215346214.png

 

Sheet2: 

svancha_2-1629215325526.png

 

Looking forward for some help. Thank you all.

1 REPLY 1
SPetrie
13 - Pulsar

I have something that will give the expected result, but I made a few assumptions. Im not totally sure how to interpret the OR for the first expected result. I dont see AAABA or AAACA anywhere in the file, so I assume its just DR  B that is matching in that first record. Sheet2 has _ characters from column B in sheet2. DR__B would not match to DR  B so I substituted those with spaces to make the match.

If I interpreted this wrong, let me know and we can go from there.

 

compare.PNG

Labels
Top Solution Authors