Apart from the capital "I" in the first person, singular, perfectly acceptable. Maybe some alternatives could be "That's just what I needed", "By jove, I needed that" etc. The context may suggest these or other permutations.
Well actually we could apply it to your question in the forum. You asked, is your sentence correct. Had I've responded simply "Yes it is", you could've remarked "That's what I needed, no confusing explanations, only a simple response"...Is that a correct sentence if you want to express that you have found something you need?