I second the advice on getting a teacher, it will be of enormous benefit.
Essentially, though, there aren't any rules set in stone as to when to shift (unless it goes higher than an Eb on the a strings in which case, short of being an octopus, you haven't got much choice), really what you want to do is try to play as much as possible in one position, cutting changes to a minimum (unless you are at a really advanced level and want a certain tonal quality or certain effects that can only be found in different positions or by an audible position change). Position shifts are really down to the individual musician (with the exception of orchestral work where the section leader generally sets them).
So at the outset, try to look at your music and figure out which position(s) will enable you to play the music with the minimum of shifts and if you can at all avoid it, try not to shift position during a phrase, limiting your shifts to between phrases (although I appreciate this isn't always practical).
You might like to get hold of the cello technique doctor too, from Dr Downing music. You can find it
here, it only costs a few pounds and is very useful.
I'm not much of an expert, but I hope this helps a bit! Perhaps some of our dip level cellists could help out more?
Good luck!
Allan