How to identify columns as variables

See this thread, which is basically the same question: