# How to replace content from a row if exists in another cell in the same row?

**URL:** <https://forum.knime.com/t/how-to-replace-content-from-a-row-if-exists-in-another-cell-in-the-same-row/22913>\
**Category:** KNIME Analytics Platform\
**Tags:** text-processing\
**Created:** [April 23, 2020, 5:53pm UTC](https://forum.knime.com/t/how-to-replace-content-from-a-row-if-exists-in-another-cell-in-the-same-row/22913 "2020-04-23T17:53:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![esabata](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/e/ce7236/32.png) [@esabata](https://forum.knime.com/u/esabata)\
**Post date:** [April 23, 2020, 5:53pm UTC](https://forum.knime.com/t/how-to-replace-content-from-a-row-if-exists-in-another-cell-in-the-same-row/22913/1 "2020-04-23T17:53:01Z")

</div>

Hi, I am newbie to KNIME and this is my first post.  
I am trying to replace content in a data set with 3 columns that looks like this:

**CAR MAKER MODEL SENTENCE**  
Ford Mondeo The 1995 Ford Mondeo was a great car…  
Mercedes A Class The german producer has brought a new A Class  
VW Polo Ultimately, the Polo is all new

The need is to look at the two columns (Car maker & Model) and if one or the two words appear in the Sentence column, to replace the keywords by “VEHICLE”. A kind of removal of car attributes so that the sentence is neutral.

Expected result:  
**CAR MAKER MODEL SENTENCE**  
Ford Mondeo The 1995 “VEHICLE” “VEHICLE” was a great car…  
Mercedes A Class The german producer has brought a new “VEHICLE”  
VW Polo Ultimately, the “VEHICLE” is all new

Thank you for your help!

---

<div class="post-metadata">

**Author:** ![HansS](https://forum-cdn.knime.com/user_avatar/forum.knime.com/hanss/32/6979_2.png) [@HansS](https://forum.knime.com/u/HansS)\
**Post date:** [April 23, 2020, 6:50pm UTC](https://forum.knime.com/t/how-to-replace-content-from-a-row-if-exists-in-another-cell-in-the-same-row/22913/2 "2020-04-23T18:50:31Z")

</div>

Hi @esabata and welcome to the Forum

Check this workflow [make\_model\_vehicle.knwf](https://forum.knime.com/uploads/short-url/85j6Um9w3jEb2mdi1zRMevs98I2.knwf) (14.5 KB) .  
 ![Screenshot from 2020-04-23 20-50-02](https://forum-cdn.knime.com/uploads/default/original/3X/1/2/1200b0f409b72548419778f59eb9135696c650e9.png)

Happy KNIMing  
gr .Hans

---

<div class="post-metadata">

**Author:** ![esabata](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/e/ce7236/32.png) [@esabata](https://forum.knime.com/u/esabata)\
**Post date:** [April 23, 2020, 7:09pm UTC](https://forum.knime.com/t/how-to-replace-content-from-a-row-if-exists-in-another-cell-in-the-same-row/22913/3 "2020-04-23T19:09:21Z")

</div>

Hi @HansS,  
this was just AMAZING and so neat 🙂. It works great .  
Thank you very much for your swift reply and help!

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [April 30, 2020, 7:09pm UTC](https://forum.knime.com/t/how-to-replace-content-from-a-row-if-exists-in-another-cell-in-the-same-row/22913/4 "2020-04-30T19:09:22Z")

</div>

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