It would take quite a while to tell all the rule. Basically, you can use both which and that as conjunctions talking abt inanimate subjects. With people it's either who or that.
But which and thare not always interchangeable. Here is an explanation from the BBC English.
Now, in a relative clause, we can use 'who' or 'whom' for people, and 'which' for things. So we can say: 'the man who came to dinner', or 'the bridge which crosses the Ganges up river from here'. So: 'the man who came to dinner', 'the bridge which crosses the Ganges'.
Now, 'that' is less formal, and it can be used for both people and things in some relative clauses. So I could say, less formally: 'the man that came to dinner', 'the bridge that crosses the Ganges'.
But, 'that' can only be used in what we call identifying relative clauses and those are clauses where you need the information to understand what you're talking about. Those were both identifying relative clauses, but if I said: 'Mr Swan, who came to dinner', I don't need 'who came to dinner' to define Mr Swan, I've already identified him. So, you can not use 'that' in that sentence, and you can not use 'that' if you are talking about: 'Waterloo Bridge, which crosses the Thames up river from here'. So, that's when you use 'which' for identifying relative clauses and for non-identifying relative clauses, but you can only use 'that' informally for identifying relative clauses. Is that clear?
Can we take certain examples for this, like, there is a group of presidents who are meeting in the conference: 'the president who is from India', 'the president which is from India', 'the president that is from India' - which one is correct?
Catherine Walter replies:
OK - you can't use 'which' for a president, because a president is a person. You can use 'who' or 'that'. If there are several presidents and you want to talk about 'the president that is coming there', instead of 'the president that's not coming there'. But if by saying 'the president' it's clear that you mean only one person, then you can not use 'that'. You have to say 'who': 'the president who is coming to the conference'.
Catherine Walter replies:
OK - you can't use 'which' for a president, because a president is a person. You can use 'who' or 'that'. If there are several presidents and you want to talk about 'the president that is coming there', instead of 'the president that's not coming there'. But if by saying 'the president' it's clear that you mean only one person, then you can not use 'that'. You have to say 'who': 'the president who is coming to the conference'[/quote]
I understand that 'who' works perfectly in the context. What I dont understand is the explanation part I highlighted...
"If there were such a machine which could travel into the past or the future, the professor would be able to verify his theory. "
I was told that 'which' was considered to doubly qualify the 'machine' here. Therefore it would be better to use 'that' here. I do not get this. Why which is odd here?
Yes, it is a relative pronoun here. As to the register, Catherine Walter in my first post in this thread does say it's informal to use that instead.
Then why does the "Microsoft Word 2000" grammar checker always suggest that "which" should be changed to "that" if it is a restrictive relative clause that doesn't need a preposition? Could it be that the "Word 2000" grammar checker is somewhat outdated? Or maybe not because of that?, because I've read a book that is written in the 1970's that almost doesn't use "that" as a relative pronouns at all?
I believe some American users use 'that' for restrictive and 'which' for non-restrictive, which seems to be the rule the grammar check is attemtping to apply. I wouldn't take it too seriously- it also tries endlessly to remove passive verbs and a few other things. I think that it hasn't really been developed as a very serious grammar tool.