Hello, and welcome to B-Greek.
First off, a little housekeeping. To post on B-Greek, you need to use your real name as your user name. If you send your name to jonathan dot robie at ibiblio dot org, I will change it for you.
On to your question. Prepositions are tricky, and the simple rule you gave doesn't really describe all the possible meanings of ἐν. Consider the different ways that ἐν πνεύματι is translated in different verses and translations:
http://concordances.org/greek/pneumati.htmFor instance:
αὐτὸς ὑμᾶς βαπτίσει ἐν πνεύματι ἁγίῳ καὶ πυρί·
he will baptize you with the Holy Spirit and fire
Μακάριοι οἱ πτωχοὶ τῷ πνεύματι
Blessed are the poor in spirit
What grammar are you learning from? It probably has a summary of different meanings of the preposition ἐν. As a beginner, the simplest thing might be to take a list of common meanings, like the ones suggested here:
http://greek-language.com/grammar/07.htmlἐν
in, on, at, by, with, among
That's an oversimplification, but the best way to learn the use of prepositions is to read a lot of text. Here are some more advanced discussions of the meaning of ἐν:
FunkSmythLSJ
ἐξίσταντο δὲ πάντες καὶ διηποροῦντο, ἄλλος πρὸς ἄλλον λέγοντες, τί θέλει τοῦτο εἶναι;