Police called to the cenotaph at Layton Cemetery in Blackpool found a man possessing 17 wraps of crack cocaine.
David Campbell, 52, of Claremont Court admitted possessing the drugs when he appeared before Blackpool Magistrates.
He is trying to get help for his drink and drugs problems
He also admitted having a small amount of heroin
Jim Mowbray, prosecuting, said that members of the public alerted police when they saw what they thought was drug dealing in the cemetery.
Gary McAnulty defending, said that Campbell had so many wraps because buying in bulk was cheaper.
The lawyer said: “He is trying to get help for his drink and drugs problems.
Campbell was sent for pre sentence reports.