This misusage has been bugging me recently. I see which used instead of that all the time (even in the newspaper!); I’ll admit, I didn’t know the difference until I did a grammar course a few years ago.

It’s not a case of which being more formal, or the two words being interchangeable. The difference is subtle, but when you’ve learnt it, the wrong usage sticks out like a blue Smartie.

In grammatical terminology, that is defining and which is non-defining. It’s to do with clauses. If you’re describing something directly, use that. If it’s a bit of additional information, a comma then which makes more sense:

I went to the shop that sells cheese.
The use of that describes the shop directly, so we know it’s not the one selling fish or bread.
I went to the shop which sells cheese.
Wrong wrong wrong! If which is used, it needs a comma before it…
I went to the shop, which sells cheese.
Slightly different meaning to the first sentence: I went to the shop is the main bit of information; its sale of cheese is an extra tidbit.

A simple way to remember it – If you use which, it needs a comma before it. Or would that would be more appropriate?

I hope that makes some sense. I’m not too good at explaining grammar: for more clarity, please refer to this excellent post on the Guardian’s Mind Your Language blog.

The lesson endeth here.