Replace based on logic

Sorry I cannot reply to the other thread as it says, new user can only reply 3 times in a thread.

So answer to your question

If you want to use the column name in expressions like $(columnname) then column name should not have any spaces or any other special characters.