Check if string contains in another datatable

Hi Everyone.

I have two files as attached file.

I want to check if any goods in “goods” file are exists in “storage” file then it write “ok” text into the “goods” file as below.

I do not want to use VBA code for this case.

I have made XAML file but I don’t know how to write the result.

Thanks you so much!
Check String.zip (22.0 KB)

You can use LookUp Range Activity
If it finds that good then u wiill get cell location
So do following steps
Excel Application: Read Both Files
For Each Row : GoodsDt
in Storage Application Scope : Use LookUp Range and write Sheet name of Storage i.e. “Sheet1” and LookUp value will be Row(“Goods”).Tostring
If Result of LookUp range is Null or “” then
Row(“Result”)=“Not Ok” else Row(“Result”)=“Ok”

Hi @trunghai,

You can do it by comparing two datatable through this you will get all the “goods” which are available in “storage” or not then you can act on it accordingly.
Here is the link to thread.

Best!
Anmol

1 Like

Hi Bro

Thanks you but I want to write the result “OK” as below picture.

Check.zip (15.1 KB)

1 Like

Hi Bro!

Thanks you so much :slight_smile:

1 Like

Awesome that it worked…!:grinning::dizzy:

1 Like

Thanks you! I have found reason :slight_smile:

I am using Contains so it will fail at some scenarios. If you want to match exact cell values. Please use the below solution.

Check.zip (16.2 KB)

Thanks!

1 Like

Thanks you so much Bro ^^

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.