Sherlock Holmes was a fictional character in a series of books and stories written in the late 19th century and early 20th century by Sir Arthur Conan Doyle. Holmes was an English detective who used his genius, along with comprehensive observation of his surroundings, deductive reasoning and logic, to solve crimes, serving as a "consulting detective" – an expert who is brought into cases that have proven too difficult for other investigators.
Data was fond of the great detective and his ability to solve mysteries by careful examination of the available evidence. (TNG: "Data's Day") He first became aware of Holmes when Riker called Picard a private eye, (TNG: "Lonely Among Us") though he was introduced to the works of Arthur Conan Doyle by Captain Picard. (TNG: "Data's Day") When describing Dixon Hill to Data, Geordi La Forge described Hill as a 20th century Sherlock Holmes. (TNG: "The Big Goodbye")
Later, Data played the role of Holmes in a holodeck program, alongside La Forge in the role of Dr. Watson. La Forge, while accompanying Data and Katherine Pulaski on a challenge to solve a Holmes mystery he had not read, accidentally programmed the Moriarty hologram so well that it became self-aware and learned of its true existence, requesting the computer to create an adversary capable of defeating Data, rather than capable of defeating Holmes. (TNG: "Elementary, Dear Data", "Ship in a Bottle")
Captain Spock once stated, "An ancestor of mine maintained that if you eliminate the impossible, whatever remains – however improbable – must be the truth." (Star Trek VI: The Undiscovered Country) This is, in fact, a famous quote of Holmes'. (TNG: "Data's Day") The alternate reality version of Spock also quoted this aphorism, although he did not attribute it to an ancestor. (Star Trek)
Star Trek movie producer/scribe Nicholas Meyer wrote both the original novel and the screenplay for the Sherlock Holmes pastiche The Seven-Per-Cent Solution, whose cast included Georgia Brown, Joel Grey, Samantha Eggar and Jeremy Kemp. Meyer once commented, "Star Trek fans are just as likely to be Sherlock Holmes fans." (audio commentary, Star Trek VI: The Undiscovered Country (Special Edition) DVD)
In a comic story released by WildStorm Comics titled "Embrace the Wolf", Data assumed the Sherlock Holmes persona to save crew members who were trapped in the holodeck and being hunted by the energy being known as Redjac. The being had recreated Victorian London to repeat his most famous historical role, that of Jack the Ripper. Using this identity, Data managed to rescue Deanna Troi from a house on the banks of the Thames by examining a comb, and subsequently lead the senior staff to a confrontation with Redjac in a slaughterhouse.