find a value from column 1 to column 2

Hello, is it possible to find a value in a different column?

I have this column and I would like to find the Street1 in column two and replace in column1 with this value

Column 1Column 2
Street 1, CA… Street 2, LA
Street 3, NY … Street 5, NJ
Streer 2, PH … Street 1, AZ

Column 1Column 2
Street 1, AZ … Street 2, LA
Street 3, NY … Street 5, NJ
Streer 2, PH … Street 1, AZ

Thanks in advance

hi @elaadani,

you have to extract the street name first (by using cell splitter).
Then build a dictionary of streets in col2 and match them to col1.
Then there will be the overwrite step by using the Rule engine.

Check this workflow attached and tell me, when this doesn’t fit your needs.
Z_030_check columns.knwf (15.4 KB)

Greetz, Tommy

3 Likes

@tommy Thank you for your kindness and prompt response.
It may be that Street 1 is in the ninth position of column 1 and fifth. Then it is in the 20th and 30th position for example of column 2.
In that case, I should replace Street 1 in the fifth position with the one in position 20 and the one in the ninth position with the one in position 30.
Does this help me to achieve this?

1 Like

hi @elaadani, so that was the first step :slight_smile:
Unfortunately there is no ranking of streets in col2. My workflow takes the first occurence of each street and matches this to col1. In my opinion there is no easy solution to your use case.
However, perhaps there has already been a fellow KNIMER who shared his solution, so back to the community :wink:

br, Tommy

1 Like

Hello @elaadani,

if there is no ranking then you create one using Rank node and add that condition to joiner :wink:

Check attached workflow:
Z_030_check columns_ipazin.knwf (30.6 KB)

Br,
Ivan

3 Likes

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