Forum Discussion

Simon_29's avatar
Simon_29
Icon for Helper II rankHelper II
4 years ago
Solved

Change the value in a column based on a value in another column

Hello,

in one community I found a command to change the value in one column based on another column, but it doesn't work properly. Could you advise me?

The problem is as follows:
I have an ORDER_STATUS column and a load_date column. I want to change the value in the load_date column based on the value in the ORDER_STATUS column. If the ORDER_STATUS column has the value "CLAW", I want the value "NA: CLAW" to be added to the load_date column.
The function should be correct (I indicated it in the picture), but it does not do what it should.

Can you advise please? Thank you very much.

  • Hi Simon_29 ,

     

    Change 'Replacer.ReplaceText' in your formula bar to 'Replacer.ReplaceValue'.

     

    Pete

  • FYI, the reason BA_Pete's solution works is because Replacer.ReplaceText looks for substrings and Replacer.ReplaceValue looks at the entire contents of a cell.

3 Replies

  • Hi Simon_29 ,

     

    Change 'Replacer.ReplaceText' in your formula bar to 'Replacer.ReplaceValue'.

     

    Pete

    • jennratten's avatar
      jennratten
      Icon for Super User rankSuper User

      FYI, the reason BA_Pete's solution works is because Replacer.ReplaceText looks for substrings and Replacer.ReplaceValue looks at the entire contents of a cell.

    • Simon_29's avatar
      Simon_29
      Icon for Helper II rankHelper II

      I appreciate your advice. Everything is already working. Thank you very much