I traced my Gt,Gt,Gt Grandfather army records down last year and he left in 1843. The only way of doing it was to physically go to Kew Gardens in London and trawl your way through the records. It’s laborious but there is no electronic way of doing this.
Alternativly there are people who will do this for you, but it will cost I’m afraid.
Tank