A shortcut for copying an X into a Column B based on data in Column A

ms office

Is there a shortcut for placing an X in a column based on the data in another column? For example, if column A has a value "red" can I get Excel to automatically place an X in column B, but NOT if Column A says "blue"?

Best Answer

Put a formula into column B (e.g. in cell B1)

=if(a1="red";"X";"")

You can also stack the ifs for different values

=if(a1="red";"X";if(a1="blue";"Y";"")