Yeah... he said it in the movies.And I'm pretty sure Sherlock Holmes never said, "Elementary, my dear Watson" in any of Sir Arthur Conan Doyle's books- but Basil Rathbone may have said it in one of the movies or something.
From wikipedia:
A third major reference is the oft-quoted but non-canonical phrase: "Elementary, my dear Watson." This phrase is never actually uttered by Holmes in any of the sixty Holmes stories written by Conan Doyle. In the stories, Holmes often remarks that his logical conclusions are "elementary", in that he considers them to be simple and obvious. He also, on occasion, refers to Dr. Watson as "my dear Watson". The two fragments, however, never appear together. One of the closest examples to this phrase appears in "The Adventure of the Crooked Man", when Holmes explains a deduction:
"Excellent!" I cried.
"Elementary." said he.
”