# If Then write to XLS

**URL:** <https://forum.knime.com/t/if-then-write-to-xls/3953>\
**Category:** KNIME Analytics Platform\
**Created:** [March 30, 2016, 1:34pm UTC](https://forum.knime.com/t/if-then-write-to-xls/3953 "2016-03-30T13:34:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![velikov16](https://forum-cdn.knime.com/user_avatar/forum.knime.com/velikov16/32/191_2.png) [@velikov16](https://forum.knime.com/u/velikov16)\
**Post date:** [March 30, 2016, 1:34pm UTC](https://forum.knime.com/t/if-then-write-to-xls/3953/1 "2016-03-30T13:34:36Z")

</div>

Hello Knime Fans,

I am trying to figth with one XLS table and one simple math rule. The idea is:

1. I have a xls table with 3 columns: Product Number | Rating | Scores

For example:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 | 10 | 40

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2 | 12 | 80

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3 | 15 | 70

2. This table is cnaging everyday, so I want to check it and IF the Scores are over 60, the Rating of the Product have to be increased with 33%.

IF Scores(Product1) \> 60

&nbsp;&nbsp; THEN Rating(Product1) = Rating(Product1) + Rating(Product1)\*33/100

3. Update the new result in a table.

I tried with Math Formula but I couldn`t find If statement with an action, I found If statement with writing 1 or 0 in a new column.

&nbsp;

How can I make it in Knime?

Can you help in this, please?

&nbsp;

Regards,

Vlady

&nbsp;

---

<div class="post-metadata">

**Author:** ![ferry.abt](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/f/e5b9ba/32.png) [@ferry.abt](https://forum.knime.com/u/ferry.abt)\
**Post date:** [March 30, 2016, 2:12pm UTC](https://forum.knime.com/t/if-then-write-to-xls/3953/2 "2016-03-30T14:12:04Z")

</div>

Hello Vlady,

I would do it with 3 steps:

1. Use a&nbsp; **Row Splitter** &nbsp;to split the table into those with over 60 and the rest.
2. Those over 60 get a&nbsp; **Math Formula** &nbsp;(btw: _Rating(Product1)\*1.33_ does the same).
3. **Concatenate** &nbsp;the two branches again.

Best,  
Ferry&nbsp;

---

<div class="post-metadata">

**Author:** ![velikov16](https://forum-cdn.knime.com/user_avatar/forum.knime.com/velikov16/32/191_2.png) [@velikov16](https://forum.knime.com/u/velikov16)\
**Post date:** [March 30, 2016, 7:10pm UTC](https://forum.knime.com/t/if-then-write-to-xls/3953/3 "2016-03-30T19:10:48Z")

</div>

Hi Ferry,

I will try it.

&nbsp;

Thank you

---

<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:** [June 23, 2023, 8:19pm UTC](https://forum.knime.com/t/if-then-write-to-xls/3953/4 "2023-06-23T20:19:53Z")

</div>


