Caz, I am going to risk that you may not know what I am about to tell you. If you already do, then please ignore it.
It may be helpful to know that each time you raise a chord up one fret by capoing or by whatever means, you raise it by one half-step. For instance, when you raised your C chord two frets, it brought the chord up two half-steps. In this way you brought the chord beyond C# and up to D. You must remember, though, that there is no half-step between E and F. Nor is there one between B and C. In other words, there is, in general terms, no E# or B#.
If you were to take an E chord and raise it three frets, it would become a G. (Remember, the progression would be E, F, F#, G.)
Half-steps can be viewed in two different ways. In general terms, if you are going up in the scale, each half-step is a sharp (except as noted for E and B). If you are going down the scale, the same half-steps are called flats. Note that in the latter case, just as there is no E# and no B#, there is also no F flat and no C flat.
Note: I have oversimplifed here somewhat and I suppose I should put in a disclaimer for those who would argue. Yes, there are some odd exceptions to the sharp and flat rules I mentioned above.
I hope this is of some help.