# changing variables to other symbols through the code

How can i change variables symbols throughout the entire code without having to change it one by one. So for example A=20 and then 2*A=40; should change to B=20 and 2*B=40.

• tried the front end find/replace menu? – george2079 Dec 14 '17 at 0:57
• Make sure to use the "whole word" option in the front end find/replace menu. – jjc385 Dec 14 '17 at 1:21
• Use ReplaceAll: expr /. A -> B. – march Dec 14 '17 at 5:31